Why is GENERC_WRITE flag set like this in dokan.c ? #1291
Replies: 4 comments
-
Another question, if I want to use outDesiredAccess(mean genericDesiredAccess in func mirrorCreateFile) and outDesiredAccess(mean creationDisposition in func mirrorCreateFile) to determine whether the operation in the current mirrorCreateFile is a write operation, what should I do? Please give me some advice. Thank u so much |
Beta Was this translation helpful? Give feedback.
-
This function is a helper to map the kernel
https://github.com/dokan-dev/dokany/blob/master/samples/dokan_memfs/memfs_operations.cpp#L140-L154 |
Beta Was this translation helpful? Give feedback.
-
Thks for your reply. I have implemented a read-write separation demo based on mirror. c and implemented COW. However, I am currently experiencing an issue. While testing Steam CS2, the game entered normally and the human-machine battle started normally. But once real person matching is performed, there will be the following situations:
This has been bothering me for a long time, looking forward to your reply :-) |
Beta Was this translation helpful? Give feedback.
-
Add another piece of information: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
in dokan.c,i find:
if ((*outDesiredAccess & FILE_GENERIC_WRITE)== FILE_GENERIC_WRITE) {
*outDesiredAccess |= GENERIC_WRITE;
genericWrite = TRUE;
}
Why not use "if ((*outDesiredAccess & FILE_GENERIC_WRITE) !=0) " ?
For example, if I only use "FILE_WRITE_DATA", outDesiredAccess will not be set GENERIC_WRITE.
Beta Was this translation helpful? Give feedback.
All reactions