CAccessToken::PrivilegeCheck

Call this method to determine whether a specified set of privileges are enabled in the CAccessToken object.

bool PrivilegeCheck( 
   PPRIVILEGE_SET RequiredPrivileges, 
   bool* pbResult  
) const throw( );

Parameters

  • RequiredPrivileges
    Pointer to a PRIVILEGE_SET structure.

  • pbResult
    Pointer to a value the method sets to indicate whether any or all of the specified privilege are enabled in the CAccessToken object.

Return Value

Returns true on success, false on failure.

Remarks

When PrivilegeCheck returns, the Attributes member of each LUID_AND_ATTRIBUTES structure is set to SE_PRIVILEGE_USED_FOR_ACCESS if the corresponding privilege is enabled. This method calls the PrivilegeCheck Win32 function.

Requirements

Header: atlsecurity.h

See Also

Reference

CAccessToken Class