Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

LONG SCardCancel ( SCARDCONTEXT  hContext  ) 

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

Parameters:
[in] hContext Connection context to the PC/SC Resource Manager.
Returns:
Error code.
Return values:
SCARD_S_SUCCESS Successful.
SCARD_E_INVALID_HANDLE Invalid hContext handle.
Test:
 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);

Definition at line 1527 of file winscard.c.

References _psContextMap::contextBlockStatus, psContextMap, SCardGetContextIndice(), SCardLockThread(), and SCardUnlockThread().

{
      /*
       * Client side function
       */
      return SCARD_S_SUCCESS;
}


Generated by  Doxygen 1.6.0   Back to index