Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The RpcRevertToSelfEx function allows a server to impersonate a client and then revert in a multithreaded operation where the call to impersonate a client can come from a thread other than the thread originally dispatched from the RPC.
Syntax
RPC_STATUS RpcRevertToSelfEx(
RPC_BINDING_HANDLE BindingHandle
);
Parameters
BindingHandle
Binding handle on the server that represents a binding to the client that the server impersonated. A value of zero specifies the client handle of the current thread; in this case, the functionality of RpcRevertToSelfEx is identical to that of the RpcRevertToSelf function.
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. |
Remarks
After calling RpcImpersonateClient and completing any tasks that require client impersonation, the server calls RpcRevertToSelfEx to end impersonation and to reestablish its own security identity. For example, consider a primary thread, called thread1, which is dispatched from a remote client and wakes up a worker thread, called thread2. If thread2 requires that the server impersonate the client, the server calls RpcImpersonateClient(THREAD1_CALL_HANDLE), performs the required task, calls RpcRevertToSelfEx(THREAD1_CALL_HANDLE) to end the impersonation, and then wakes up thread1.
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 |