SCardReleaseContext function

The SCardReleaseContext function closes an established resource manager context, freeing any resources allocated under that context, including SCARDHANDLE objects and memory allocated using the SCARD_AUTOALLOCATE length designator.

Syntax

LONG SCardReleaseContext(
  SCARDCONTEXT hContext
);

Parameters

hContext

Handle that identifies the resource manager context. The resource manager context is set by a previous call to SCardEstablishContext.

Return Value

This function returns different values depending on whether it succeeds or fails.

Return code Description
Success
SCARD_S_SUCCESS.
Failure
An error code. For more information, see Smart Card Return Values.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header winscard.h
Library Winscard.lib
DLL Winscard.dll

See Also

SCardEstablishContext