-
-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add projectedfslib #910
Open
fanzeyi
wants to merge
7
commits into
retep998:0.3
Choose a base branch
from
fanzeyi:projectedfslib
base: 0.3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add projectedfslib #910
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Generated with: ```cpp // This ensures all anonymous structs and unions have a field name so you can get its size and alignment #define NONAMELESSUNION #include <cstdint> #include <iostream> #include <BaseTsd.h> #include <windows.h> #include <projectedfslib.h> // Include whichever windows SDK headers are needed to get the correct types. Note that some headers cannot be included directly. #define PRINT(x) std::cout << " assert_eq!(size_of::<"#x">(), " << sizeof(x) << ");" << std::endl;\ std::cout << " assert_eq!(align_of::<"#x">(), " << alignof(x) << ");" << std::endl; int main() { PRINT(PRJ_NOTIFY_TYPES); PRINT(PRJ_NOTIFICATION); PRINT(PRJ_EXT_INFO_TYPE); PRINT(decltype(PRJ_EXTENDED_INFO::u.Symlink)); PRINT(decltype(PRJ_EXTENDED_INFO::u)); PRINT(PRJ_EXTENDED_INFO); PRINT(PRJ_NOTIFICATION_MAPPING); PRINT(PRJ_STARTVIRTUALIZING_FLAGS); PRINT(PRJ_STARTVIRTUALIZING_OPTIONS); PRINT(PRJ_VIRTUALIZATION_INSTANCE_INFO); PRINT(PRJ_PLACEHOLDER_ID); PRINT(PRJ_PLACEHOLDER_VERSION_INFO); PRINT(PRJ_FILE_BASIC_INFO); PRINT(decltype(PRJ_PLACEHOLDER_INFO::EaInformation)); PRINT(decltype(PRJ_PLACEHOLDER_INFO::SecurityInformation)); PRINT(decltype(PRJ_PLACEHOLDER_INFO::StreamsInformation)); PRINT(PRJ_PLACEHOLDER_INFO); PRINT(PRJ_UPDATE_TYPES); PRINT(PRJ_UPDATE_FAILURE_CAUSES); PRINT(PRJ_FILE_STATE); PRINT(PRJ_CALLBACK_DATA_FLAGS); PRINT(PRJ_CALLBACK_DATA); PRINT(decltype(PRJ_NOTIFICATION_PARAMETERS::PostCreate)); PRINT(decltype(PRJ_NOTIFICATION_PARAMETERS::FileRenamed)); PRINT(decltype(PRJ_NOTIFICATION_PARAMETERS::FileDeletedOnHandleClose)); PRINT(PRJ_NOTIFICATION_PARAMETERS); PRINT(PRJ_CALLBACKS); PRINT(PRJ_COMPLETE_COMMAND_TYPE); PRINT(decltype(PRJ_COMPLETE_COMMAND_EXTENDED_PARAMETERS::u.Notification)); PRINT(decltype(PRJ_COMPLETE_COMMAND_EXTENDED_PARAMETERS::u.Enumeration)); PRINT(decltype(PRJ_COMPLETE_COMMAND_EXTENDED_PARAMETERS::u)); PRINT(PRJ_COMPLETE_COMMAND_EXTENDED_PARAMETERS); return 0; } ```
retep998
reviewed
Jun 19, 2020
Alright, I've finished rewriting the RegFS example in Rust. It is available here: https://github.com/fanzeyi/prjfs-rs and it uses fairly amount of the API I added in this PR. It works! |
xavierd
reviewed
Aug 4, 2020
src/um/projectedfslib.rs
Outdated
byteOffset: UINT64, | ||
length: UINT32, | ||
) -> HRESULT; | ||
pub fn PrjGetOnDiskFileState(destinationFileName: PCWSTR, fileState: *mut PRJ_FILE_STATE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should return an HRESULT.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds bindings to Projected File System.
I want to open a pull request to avoid duplicate works. I think most things should work. However there are a few structs are not passing the structs x64 test because of possible incorrect definition of anonymous unions.
I also want to spend some time replicating the official RegFS example with this API, so we can be confident that this binding works fine.