Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

ACCESS_MASK (Enums)
 
.
Summary
The ACCESS_MASK data type is a double word value that defines standard, specific, and generic rights. These rights are used in access control entries (ACEs) and are the primary means of specifying the requested or granted access to an object.

C# Definition:

[Flags]
public enum ACCESS_MASK : uint
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:

<Flags()> _
Public Enum ACCESS_MASK : Uint32
    DELETE = &H10000
    READ_CONTROL = &H20000
    WRITE_DAC = &H40000
    WRITE_OWNER = &H80000
    SYNCHRONIZE = &H100000
     DELETE = 0x00010000,
     READ_CONTROL = 0x00020000,
     WRITE_DAC = 0x00040000,
     WRITE_OWNER = 0x00080000,
     SYNCHRONIZE = 0x00100000,

    STANDARD_RIGHTS_REQUIRED = &HF0000
     STANDARD_RIGHTS_REQUIRED = 0x000f0000,

    STANDARD_RIGHTS_READ = &H20000
    STANDARD_RIGHTS_WRITE = &H20000
    STANDARD_RIGHTS_EXECUTE = &H20000
     STANDARD_RIGHTS_READ = 0x00020000,
     STANDARD_RIGHTS_WRITE = 0x00020000,
     STANDARD_RIGHTS_EXECUTE = 0x00020000,

    STANDARD_RIGHTS_ALL = &H1F0000
     STANDARD_RIGHTS_ALL = 0x001f0000,

    SPECIFIC_RIGHTS_ALL = &HFFFF
     SPECIFIC_RIGHTS_ALL = 0x0000ffff,

    ACCESS_SYSTEM_SECURITY = &H1000000
     ACCESS_SYSTEM_SECURITY = 0x01000000,

    MAXIMUM_ALLOWED = &H2000000
     MAXIMUM_ALLOWED = 0x02000000,

    GENERIC_READ = &H80000000
    GENERIC_WRITE = &H40000000
    GENERIC_EXECUTE = &H20000000
    GENERIC_ALL = &H10000000
     GENERIC_READ = 0x80000000,
     GENERIC_WRITE = 0x40000000,
     GENERIC_EXECUTE = 0x20000000,
     GENERIC_ALL = 0x10000000,

    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
     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 = &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_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 = &H37F
     WINSTA_ALL_ACCESS = 0x0000037f
}

VB Definition:

Enum ACCESS_MASK
   TODO
End Enum

Notes:

This is NOT a complete enum. Access masks have 16 bits of standard rights, and 16 bits of specific rights, that are different depending on the type of object they are applied to. Included in this enum are rights for the Desktop object and Window Station objects.

Documentation
ACCESS_MASK on MSDN
 

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it!

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions