These three projects represent the sample code for the Code Project article:
The Windows Access Control Model Part 2.
There are equivalent programs written in
Windows NT (C)
Windows 2000 (C++)
ATL (C++) (most of the ATL code is available in the Codeproject article)
These sample programs were not designed to be reusable, but rather to demo
the access control functions. It's more for education rather than for reuse.
The functions are as follows:
Print a SID.
Convert a SID to a trustee and username.
Obtain the user SID from an access token (and print the user from it).
Enable and disable a Privilege.
Obtain a security descriptor from an file object.
Extract Control, Owner, Group, SACL, and DACL from security descriptor.
Read a DACL.
Perform an access check.
Create a DACL.
Create a Security descriptor.
Apply the security descriptor to an object (creating it if necessary).
Using the private security object functions.
Given enough interest, I may change the code to be reusable
(except for method 1!).