IServerSecurity::RevertToSelf  32FH4PT

Restores the authentication information on a thread to the process s identity.

HRESULT RevertToSelf()

 

Return Values

This method supports the standard return value E_FAIL, as well as the following:

S_OK

Success.

 

Remarks

IServerSecurity::RevertToSelf restores the authentication information and reverts an impersonation on a thread to the process s identity. This method will only revert impersonation changes made by IServerSecurity::ImpersonateClient432_MJ5. If the thread token is modified by other means (through the SetThreadToken or RpcImpersonateClient Win32 functions) the result of this function is undefined.

In the apartment model, CoRevertToSelfZWK_9R (IServerSecurity::RevertToSelf) affects only the current method invocation. If there are nested method invocations, they each may have their own impersonation and COM will correctly restore the impersonation before returning to them (regardless of whether or not CoRevertToSelf/IServerSecurity::RevertToSelf was called).

 

See Also

CoRevertToSelf