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();
Return value
Value | Meaning |
---|---|
|
The call succeeded. |
|
The server does not have a client to impersonate. |
|
The binding handle is invalid. |
|
This is the wrong kind of binding for this operation. |
|
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
Requirement | Value |
---|---|
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 |