Partager via


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.

Return Value

Returns true on success, false on failure.

Remarks

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.

Requirements

Header: atlsecurity.h

See Also

Concepts

Security Global Functions

AtlSetSacl

CSacl Class