Share via


CAccessToken::CreateImpersonationToken

Call this method to create an impersonation access token.

bool CreateImpersonationToken( 
   CAccessToken* pImp, 
   SECURITY_IMPERSONATION_LEVEL sil = SecurityImpersonation 
) const throw(...);

Parameters

  • pImp
    Pointer to the new CAccessToken object.

  • sil
    Specifies a SECURITY_IMPERSONATION_LEVEL enumerated type that supplies the impersonation level of the new token.

Return Value

Returns true on success, false on failure.

Remarks

CreateImpersonationToken calls DuplicateToken to create a new impersonation token.

Requirements

Header: atlsecurity.h

See Also

Reference

CAccessToken Class

CAccessToken::CreatePrimaryToken

CAccessToken::CreateRestrictedToken

CAccessToken::Revert