CoRevertToSelf

Restores the authentication information on a thread of execution.

HRESULT CoRevertToSelf( )

Return Values

This function supports the standard return value E_INVALIDARG, as well as the following:

S_OK
Indicates success.

Remarks

CoRevertToSelf, which is a helper function that calls IServerSecurity::RevertToSelf, restores the authentication information on a thread to the authentication information on the thread before impersonation began. For more details, see IServerSecurity::RevertToSelf.

CoRevertToSelf encapsulates the following common sequence of calls (error handling excluded):

CoGetCallContext(IID_IServerSecurity, (void**)&pss);
    pss->RevertToSelf();
    pss->Release();
 

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in objbase.h.
  Import Library: Included as a resource in ole32.dll.

See Also

IServerSecurity::RevertToSelf, CoGetCallContext, Security in COM