CAccessToken::DisablePrivilege

Call this method to disable a privilege in the CAccessToken object.

bool DisablePrivilege(
   LPCTSTR pszPrivilege,
   CTokenPrivileges* pPreviousState = NULL
) throw(...);

Parameters

  • pszPrivilege
    Pointer to a string containing the privilege to disable in the CAccessToken object.

  • pPreviousState
    Pointer to a CTokenPrivileges object which will contain the previous state of the privileges.

Return Value

Returns true on success, false on failure.

Requirements

Header: atlsecurity.h

See Also

Reference

CAccessToken Class

CAccessToken::DisablePrivileges

CAccessToken::EnablePrivilege

Other Resources

CAccessToken Members