Object type |
Low-level functions |
Files
Directories
Mailslots
Named pipes |
Use the GetFileSecurity and SetFileSecurity functions. These functions use character strings to identify the securable object, instead of using handles. |
Processes
Threads
Access tokens
File-mapping objects
Semaphores
Events
Mutexes
Waitable timers |
Use the GetKernelObjectSecurity and SetKernelObjectSecurity functions. |
Window stations
Desktops |
Use the GetUserObjectSecurity and SetUserObjectSecurity functions. |
Registry keys |
Use the RegGetKeySecurity and RegSetKeySecurity functions. |
Win32 service objects |
Use the QueryServiceObjectSecurity and SetServiceObjectSecurity functions. |
Printer objects |
Use the PRINTER_INFO_2 structure with the GetPrinter and SetPrinter functions. |
Network shares |
Use level 502 with the NetShareGetInfo and NetShareSetInfo functions. |
Private objects (objects private to the creating application) |
Use the CreatePrivateObjectSecurity, DestroyPrivateObjectSecurity, GetPrivateObjectSecurity and SetPrivateObjectSecurity functions. |