Export (0) Print
Expand All
Expand Minimize

DeleteSecurityContext function

The DeleteSecurityContext function deletes the local data structures associated with the specified security context initiated by a previous call to the InitializeSecurityContext (General) function or the AcceptSecurityContext (General) function.

Syntax


SECURITY_STATUS SEC_Entry DeleteSecurityContext(
  _In_  PCtxtHandle phContext
);

Parameters

phContext [in]

Handle of the security context to delete.

Return value

If the function succeeds or the handle has already been deleted, the return value is SEC_E_OK.

If the function fails, the return value can be the following error code.

Return codeDescription
SEC_E_INVALID_HANDLE

The handle passed to the function is not valid.

 

Remarks

The DeleteSecurityContext function terminates a security context and frees associated resources.

The caller must call this function for a security context when that security context is no longer needed. This is true if the security context is partial, incomplete, rejected, or failed. After the security context is successfully deleted, further use of that security context is not permitted and the handle is no longer valid.

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
InitializeSecurityContext (General)
AcceptSecurityContext (General)

 

 

Community Additions

ADD
Show:
© 2015 Microsoft