The RevertToSelf function terminates the impersonation of a client application.
BOOL RevertToSelf(VOID)
This function has no parameters.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
It is advisable for a process to call the RevertToSelf function after finishing any impersonation begun by using the DdeImpersonateClient, ImpersonateNamedPipeClient, or ImpersonateSelf function.
DdeImpersonateClient, ImpersonateNamedPipeClient, ImpersonateSelf