RpcRevertToSelf  90RWYT

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.

This function is supported only by Windows NT.

#include <rpc.h>

RPC_STATUS RPC_ENTRY RpcRevertToSelf (VOID);

Return Values

Value

Meaning

RPC_S_OK

Success.

RPC_S_NO_CALL_ACTIVE

Server does not have a client to impersonate.

RPC_S_INVALID_BINDING

Invalid binding handle.

RPC_S_WRONG_KIND_OF_BINDING

Wrong kind of binding for operation.

RPC_S_CANNOT_SUPPORT

Not supported for this operating system, this transport, or this security subsystem.

 

Remarks

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

See Also

RpcImpersonateClient, Impersonation