Поделиться через


CAccessToken::CreateImpersonationToken

Call this method to create a new impersonation access token.

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

Параметры

  • pImp
    Pointer to the new CAccessToken object.

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

Возвращаемое значение

Returns true on success, false on failure.

Заметки

CreateImpersonationToken calls DuplicateToken to create a new impersonation token.

Требования

Header: atlsecurity.h

См. также

Основные понятия

CAccessToken Class

CAccessToken Members

CAccessToken::CreatePrimaryToken

CAccessToken::CreateRestrictedToken

CAccessToken::Revert