SCardReleaseContext function (winscard.h)

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(
  [in] SCARDCONTEXT hContext
);

Parameters

[in] 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

Requirement Value
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