[Pcsclite-cvs-commit] r2382 - trunk/PCSC/doc/example

Ludovic Rousseau rousseau at alioth.debian.org
Mon Feb 5 14:35:31 CET 2007


Author: rousseau
Date: 2007-02-05 14:35:31 +0100 (Mon, 05 Feb 2007)
New Revision: 2382

Modified:
   trunk/PCSC/doc/example/pcsc_demo.c
Log:
add SCardBeginTransaction() & SCardEndTransaction


Modified: trunk/PCSC/doc/example/pcsc_demo.c
===================================================================
--- trunk/PCSC/doc/example/pcsc_demo.c	2007-02-05 13:34:36 UTC (rev 2381)
+++ trunk/PCSC/doc/example/pcsc_demo.c	2007-02-05 13:35:31 UTC (rev 2382)
@@ -245,6 +245,10 @@
 		PCSC_ERROR(rv, "SCardGetStatusChange")
 	}
 
+	/* begin transaction */
+	rv = SCardBeginTransaction(hCard);
+	PCSC_ERROR(rv, "SCardBeginTransaction")
+
 	/* exchange APDU */
 	dwSendLength = sizeof(pbSendBuffer);
 	dwRecvLength = sizeof(pbRecvBuffer);
@@ -252,6 +256,10 @@
 		&pioRecvPci, pbRecvBuffer, &dwRecvLength);
 	PCSC_ERROR(rv, "SCardTransmit")
 
+	/* end transaction */
+	rv = SCardEndTransaction(hCard, SCARD_LEAVE_CARD);
+	PCSC_ERROR(rv, "SCardEndTransaction")
+
 	/* card disconnect */
 	rv = SCardDisconnect(hCard, SCARD_UNPOWER_CARD);
 	PCSC_ERROR(rv, "SCardDisconnect")




More information about the Pcsclite-cvs-commit mailing list