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

LONG SCardEndTransaction ( SCARDHANDLE  hCard,
DWORD  dwDisposition 
)

This function ends a previously begun transaction.

The calling application must be the owner of the previously begun transaction or an error will occur.

Parameters:
[in] hCard Connection made from SCardConnect.
[in] dwDisposition Action to be taken on the reader. The disposition action is not currently used in this release.
  • SCARD_LEAVE_CARD - Do nothing.
  • SCARD_RESET_CARD - Reset the card.
  • SCARD_UNPOWER_CARD - Unpower the card.
  • SCARD_EJECT_CARD - Eject the card.
Returns:
Error code.
Return values:
SCARD_S_SUCCESS Successful.
SCARD_E_INVALID_HANDLE Invalid hCard handle.
SCARD_E_SHARING_VIOLATION Someone else has exclusive rights.
SCARD_E_READER_UNAVAILABLE The reader has been removed.
Test:
 SCARDCONTEXT hContext;
 SCARDHANDLE hCard;
 DWORD dwActiveProtocol;
 LONG rv;
 ...
 rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
 rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
 rv = SCardBeginTransaction(hCard);
 ...
 / * Do some transmit commands * /
 ...
 rv = SCardEndTransaction(hCard, SCARD_LEAVE_CARD); 

Definition at line 557 of file winscard_scf.c.

References SCardLockThread(), and SCardUnlockThread().

Referenced by MSGFunctionDemarshall().

{
      long rv;

      SCardLockThread();
      rv = SCardEndTransactionTH(hCard, dwDisposition);
      SCardUnlockThread();
      return rv;
}


Generated by  Doxygen 1.6.0   Back to index