Share via


CAutoRevertImpersonation::Detach

Cancels the automatic impersonation reversion.

const CAccessToken* Detach() throw( );

Return Value

The address of the previously associated CAccessToken, or NULL if no association existed.

Remarks

Calling Detach prevents the CAutoRevertImpersonation object from reverting any impersonation currently in effect for the CAccessToken object associated with this object. CAutoRevertImpersonation can then be destroyed with no effect or reassociated to the same or another CAccessToken object using Attach.

Requirements

Header: atlsecurity.h

See Also

Reference

CAutoRevertImpersonation Class

CAccessToken Class

Other Resources

CAutoRevertImpersonation Members