Export (0) Print
Expand All
Expand Minimize

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 codeDescription
SEC_E_INVALID_HANDLE

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

Sspi.h (include Security.h)

Library

Secur32.lib

DLL

Secur32.dll

See also

SSPI Functions
AcceptSecurityContext (General)
ImpersonateSecurityContext

 

 

Community Additions

ADD
Show:
© 2014 Microsoft