DesiredAccess and FILE_ACCESS_FLAGS enums #1440
Labels
broken api
An API is inaccurate and could lead to runtime failure
missing enum
An enum is missing for constant parameters
These two enums are defined in the metadata, and they are nearly identical.
These enums look worthy of consolidating. I believe
FILE_ACCESS_FLAGS
is the preferred name, and that one already has all the members.Particularly interesting however is how
FILE_ALL_ACCESS
has different values between these enums. I'm guessing that's a bug. In the header files, this value is defined as:So it appears that one enum defines the
FILE_ALL_ACCESS
value withSYNCHRONIZE
while the other leaves it out. I can't imagine why that would be intentional, as it appears that the header files consistently apply theSYNCHRONIZE
flag.So all the more reason to:
DesiredAccess
and redirect all users of it over toFILE_ACCESS_FLAGS
.And speaking of users of this enum,
NtCreateFile
could use some love:DesiredAccess
parameter is currently declared asuint
, but it ought to be as thisFILE_ACCESS_FLAGS
enum.FileAttributes
parameter should be declared asFILE_FLAGS_AND_ATTRIBUTES
.The text was updated successfully, but these errors were encountered: