Subsections

SCardIsValidContext

Synopsis:

#include <winscard.h>

LONG SCardIsValidContext(SCARDCONTEXT hContext);

Parameters:

hContext IN Connection context to be checked

Description:

This function determines whether a smart card context handle is still valid. After a smart card context handle has been set by SCardEstablishContext(), it may become not valid if the resource manager service has been shut down.

Example:

SCARDCONTEXT hContext;
LONG rv;

rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
rv = SCardIsValidContext(hContext);

Returns:

SCARD_S_SUCCESS Successful
SCARD_E_INVALID_HANDLE Invalid hContext handle



2007-06-17