RpcRevertToSelf function (rpcdce.h)

After calling RpcImpersonateClient and completing any tasks that require client impersonation, the server calls RpcRevertToSelf to end impersonation and to reestablish its own security identity.

Syntax

RPC_STATUS RpcRevertToSelf();

Parameters

This function has no parameters.

Return value

Value Meaning
RPC_S_OK
The call succeeded.
RPC_S_NO_CALL_ACTIVE
The server does not have a client to impersonate.
RPC_S_INVALID_BINDING
The binding handle is invalid.
RPC_S_WRONG_KIND_OF_BINDING
This is the wrong kind of binding for this operation.
RPC_S_CANNOT_SUPPORT
The call is not supported for this operating system, this transport, or this security subsystem.
 
Note  For a list of valid error codes, see RPC Return Values.
 

Remarks

In a multithreaded application, if the call to RpcImpersonateClient is with a handle to another client thread, you must call RpcRevertToSelfEx with the handle to that thread to end impersonation.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header rpcdce.h (include Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll

See also

Client Impersonation

RpcImpersonateClient