#include <winscard.h> LONG SCardIsValidContext(SCARDCONTEXT hContext);
| hContext | IN | Connection context to be checked |
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.
SCARDCONTEXT hContext; LONG rv; rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext); rv = SCardIsValidContext(hContext);
| SCARD_S_SUCCESS | Successful |
| SCARD_E_INVALID_HANDLE | Invalid hContext handle |