artiche / dokan

Automatically exported from code.google.com/p/dokan
0 stars 0 forks source link

dwDesiredAccess flags in CreateFile are not working #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call CreateFile on a dokan mounted drive with GENERIC_READ and or 
GENERIC_WRITE set for the "dwDesiredAccess" argument
2. Observe how the CreateFile dokan driver callback provides a seemingly 
bogus value of 1245599 (0x13019F).
3.
#define GENERIC_READ    0x80000000
#define GENERIC_WRITE   0x40000000

What is the expected output? What do you see instead?
Expected: Correct values for dwDesiredAccess when using CreateFile
Actual: What seems like a random value

What version of the product are you using? On what operating system?
Dokan: 0.3.7
OS: Windows XP Home SP3

Please provide any additional information below.
This is likely not only an issue with GENERIC_READ and _WRITE but probably 
any other flag used to define the access mode.

Original issue reported on code.google.com by dres.sch...@gmail.com on 21 Sep 2008 at 8:06

GoogleCodeExporter commented 9 years ago
Hello,
Working as intended.
Please see the flowing page.
http://msdn.microsoft.com/en-us/library/aa364399(VS.85).aspx

GENERIC_READ and GENERIC_WRITE can be shown as combination of specific options.

GENERIC_EXECUTE = FILE_READ_ATTRIBUTES | STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE
GENERIC_READ = FILE_READ_ATTRIBUTES | FILE_READ_DATA | FILE_READ_EA | 
STANDARD_RIGHTS_READ |SYNCHRONIZE
GENERIC_WRITE = FILE_APPEND_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_DATA | 
FILE_WRITE_EA | STANDARD_RIGHTS_WRITE | 
SYNCHRONIZE

Original comment by asa...@gmail.com on 28 Sep 2008 at 8:47