Subsections

SCardCancel

Synopsis:

#include <winscard.h>

LONG SCardCancel(SCARDCONTEXT hContext);

Parameters:

hContext IN Connection context to the PC/SC Resource Manager

Description:

This function cancels all pending blocking requests on the GetStatusChange() function.

Example:

SCARDCONTEXT hContext;
DWORD cReaders;
SCARD_READERSTATE rgReaderStates;
LONG rv;

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

rgReaderStates.szReader = strdup("Reader X");
rgReaderStates.dwCurrentState = SCARD_STATE_EMPTY;

/* Spawn off thread for following function */
rv = SCardGetStatusChange(hContext, 0, rgReaderStates, cReaders);

rv = SCardCancel(hContext);

Returns:

SCARD_S_SUCCESS Successful
SCARD_E_INVALID_HANDLE Invalid hContext handle



2007-06-17