# ACCESS\_MASK

### C# Definition:

```cs
[Flags]
public enum ACCESS_MASK : uint
{
    DELETE = 0x00010000,
    READ_CONTROL = 0x00020000,
    WRITE_DAC = 0x00040000,
    WRITE_OWNER = 0x00080000,
    SYNCHRONIZE = 0x00100000,

    STANDARD_RIGHTS_REQUIRED = 0x000F0000,

    STANDARD_RIGHTS_READ = 0x00020000,
    STANDARD_RIGHTS_WRITE = 0x00020000,
    STANDARD_RIGHTS_EXECUTE = 0x00020000,

    STANDARD_RIGHTS_ALL = 0x001F0000,

    SPECIFIC_RIGHTS_ALL = 0x0000FFFF,

    ACCESS_SYSTEM_SECURITY = 0x01000000,

    MAXIMUM_ALLOWED = 0x02000000,

    GENERIC_READ = 0x80000000,
    GENERIC_WRITE = 0x40000000,
    GENERIC_EXECUTE = 0x20000000,
    GENERIC_ALL = 0x10000000,

    DESKTOP_READOBJECTS = 0x00000001,
    DESKTOP_CREATEWINDOW = 0x00000002,
    DESKTOP_CREATEMENU = 0x00000004,
    DESKTOP_HOOKCONTROL = 0x00000008,
    DESKTOP_JOURNALRECORD = 0x00000010,
    DESKTOP_JOURNALPLAYBACK = 0x00000020,
    DESKTOP_ENUMERATE = 0x00000040,
    DESKTOP_WRITEOBJECTS = 0x00000080,
    DESKTOP_SWITCHDESKTOP = 0x00000100,

    WINSTA_ENUMDESKTOPS = 0x00000001,
    WINSTA_READATTRIBUTES = 0x00000002,
    WINSTA_ACCESSCLIPBOARD = 0x00000004,
    WINSTA_CREATEDESKTOP = 0x00000008,
    WINSTA_WRITEATTRIBUTES = 0x00000010,
    WINSTA_ACCESSGLOBALATOMS = 0x00000020,
    WINSTA_EXITWINDOWS = 0x00000040,
    WINSTA_ENUMERATE = 0x00000100,
    WINSTA_READSCREEN = 0x00000200,

    WINSTA_ALL_ACCESS = 0x0000037F
}
```

### VB Definition:

```cs
<Flags()> _
Public Enum ACCESS_MASK : Uint32
    DELETE = &H10000
    READ_CONTROL = &H20000
    WRITE_DAC = &H40000
    WRITE_OWNER = &H80000
    SYNCHRONIZE = &H100000

    STANDARD_RIGHTS_REQUIRED = &HF0000

    STANDARD_RIGHTS_READ = &H20000
    STANDARD_RIGHTS_WRITE = &H20000
    STANDARD_RIGHTS_EXECUTE = &H20000

    STANDARD_RIGHTS_ALL = &H1F0000

    SPECIFIC_RIGHTS_ALL = &HFFFF

    ACCESS_SYSTEM_SECURITY = &H1000000

    MAXIMUM_ALLOWED = &H2000000

    GENERIC_READ = &H80000000
    GENERIC_WRITE = &H40000000
    GENERIC_EXECUTE = &H20000000
    GENERIC_ALL = &H10000000

    DESKTOP_READOBJECTS = &H1
    DESKTOP_CREATEWINDOW = &H2
    DESKTOP_CREATEMENU = &H4
    DESKTOP_HOOKCONTROL = &H8
    DESKTOP_JOURNALRECORD = &H10
    DESKTOP_JOURNALPLAYBACK = &H20
    DESKTOP_ENUMERATE = &H40
    DESKTOP_WRITEOBJECTS = &H80
    DESKTOP_SWITCHDESKTOP = &H100

    WINSTA_ENUMDESKTOPS = &H1
    WINSTA_READATTRIBUTES = &H2
    WINSTA_ACCESSCLIPBOARD = &H4
    WINSTA_CREATEDESKTOP = &H8
    WINSTA_WRITEATTRIBUTES = &H10
    WINSTA_ACCESSGLOBALATOMS = &H20
    WINSTA_EXITWINDOWS = &H40
    WINSTA_ENUMERATE = &H100
    WINSTA_READSCREEN = &H200

    WINSTA_ALL_ACCESS = &H37F
End Enum
```
