Export (0) Print
Expand All
ATL
Expand Minimize

AtlGetSacl 

Call this function to retrieve the system access-control list (SACL) information of a specified object.


inline bool AtlGetSacl(
   HANDLE hObject,
   SE_OBJECT_TYPE ObjectType,
   CSacl* pSacl,
   bool bRequestNeededPrivileges = true
) throw(...);

Parameters

hObject

Handle to the object from which to retrieve the security information.

ObjectType

Specifies a value from the SE_OBJECT_TYPE enumeration that indicates the type of object identified by the hObject parameter.

pSacl

Pointer to a SACL object which will contain the retrieved security information.

bRequestNeededPrivileges

If true, the function will attempt to enable the SE_SECURITY_NAME privilege, and restore it on completion.

Returns true on success, false on failure.

If AtlGetSacl is to be called many times on many different objects, it will be more efficient to enable the SE_SECURITY_NAME privilege once before calling the function, with bRequestNeededPrivileges set to false.

Community Additions

ADD
Show:
© 2014 Microsoft