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.
KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY DeleteSecurityContext( PCtxtHandle phContext );
Handle of the security context to delete.
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.
||The handle passed to the function is not valid.|
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.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||sspi.h (include Security.h)|