RevertSecurityContext function
Allows a security package to discontinue the impersonation of the caller and restore its own security context.
Syntax
SECURITY_STATUS SEC_Entry RevertSecurityContext( _In_ PCtxtHandle phContext );
Parameters
- phContext [in]
-
Handle of the security context being impersonated. This handle must have been obtained in the call to the AcceptSecurityContext (General) function and used in the call to the ImpersonateSecurityContext function.
Return value
If the function succeeds, the return value is SEC_E_OK.
If the function fails, the return value can be one of the following error codes.
| Return code | Description |
|---|---|
|
The handle passed to the function is not valid. |
Remarks
RevertSecurityContext is not available with all security packages on all platforms. Typically, it is implemented only on platforms and with security packages for which a call to the QuerySecurityPackageInfo function indicates impersonation support.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also