CoRevertToSelf function

Restores the authentication information on a thread of execution.

Syntax


HRESULT CoRevertToSelf(void);

Parameters

This function has no parameters.

Return value

This function supports the standard return values, including S_OK to indicate 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.

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

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

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Objbase.h

Library

Ole32.lib

DLL

Ole32.dll

See also

CoGetCallContext
IServerSecurity::RevertToSelf
Security in COM

 

 

Show: