dwDesiredAccess
[in] Specifies the type of access to the object. An application can obtain read access, write access, read/write access, or device query access. This parameter can be any combination of the following values. Value Meaning
0 Specifies device query access to the object. An application can query device attributes without accessing the device.
GENERIC_READ Specifies read access to the object. Data can be read from the file and the file pointer can be moved. Combine with GENERIC_WRITE for read/write access.
GENERIC_WRITE Specifies write access to the object. Data can be written to the file and the file pointer can be moved. Combine with GENERIC_READ for read/write access.
In addition, you can specify the following access flags. Value Documented
DELETE Standard Access Rights
READ_CONTROL Standard Access Rights
WRITE_DAC Standard Access Rights
WRITE_OWNER Standard Access Rights
SYNCHRONIZE Standard Access Rights
STANDARD_RIGHTS_REQUIRED Standard Access Rights
STANDARD_RIGHTS_READ Standard Access Rights
STANDARD_RIGHTS_WRITE Standard Access Rights
STANDARD_RIGHTS_EXECUTE Standard Access Rights
STANDARD_RIGHTS_ALL Standard Access Rights
SPECIFIC_RIGHTS_ALL ACCESS_MASK
ACCESS_SYSTEM_SECURITY ACCESS_MASK
MAXIMUM_ALLOWED ACCESS_MASK
GENERIC_READ ACCESS_MASK
GENERIC_WRITE ACCESS_MASK
GENERIC_EXECUTE ACCESS_MASK
GENERIC_ALL ACCESS_MASK