srv_revert_to_self (Extended Stored Procedure API)

Ends the impersonation of a client application.

BOOL srv_revert_to_self (SRV_PROC *srvproc);

Arguments

  • srvproc
    Is a pointer to the SRV_PROC structure that is the handle for a particular client connection. The structure contains all the information that the Extended Stored Procedure API library uses to manage communications and data between the application and the client.

Returns

true when the stored procedure successfully ends impersonation; otherwise, false.

Remarks

An extended stored procedure should call srv_revert_to_self after it ends any impersonation that was started by using srv_impersonate_client (Extended Stored Procedure API).

If srv_revert_to_self fails, an application continues to run in the context of the client. This might not be appropriate. When srv_revert_to_self fails, you should shut down the process.

See Also

Other Resources

Client Impersonation