SCardEndTransaction(hCard,SCARD_EJECT_CARD);

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SCardEndTransaction(hCard,SCARD_EJECT_CARD);

Christophe FERRANDO

Hi,

 

With the last pcsclite version, i have a return of ScardEndTransaction =

SCardEndTransaction:[8010001f] Feature not supported.

      case 577 : {

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

               CHECK("SCardEstablishContext", rv)

               rv = SCardConnect(hContext,mszReaders,

                         SCARD_SHARE_EXCLUSIVE,SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);

               CHECK("SCardConnect", rv);

               rv = SCardBeginTransaction(hCard);

               CHECK("SCardBeginTransaction", rv);

               printf("Enleve la carte, puis appuie sur une touche!\n");getchar();

               rv = SCardEndTransaction(hCard,SCARD_EJECT_CARD);

               CHECK("SCardEndTransaction", rv);

               rv = SCardDisconnect(hCard, SCARD_LEAVE_CARD);

               CHECK("SCardDisconnect", rv)

               rv = SCardReleaseContext(hContext);

               CHECK("SCardReleaseContext", rv)

               break;

      }

 

With the previous version, I had :

SCardEndTransaction:[80100069] Card was removed.

 

May be a little problem,

 

Sincerly,

Christophe FERRANDO

 

 


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: SCardEndTransaction(hCard,SCARD_EJECT_CARD);

Ludovic Rousseau
2016-06-02 18:03 GMT+02:00 Christophe FERRANDO <[hidden email]>:

Hi,


Hello Christophe,
 

 

With the last pcsclite version, i have a return of ScardEndTransaction =

SCardEndTransaction:[8010001f] Feature not supported.

      case 577 : {

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

               CHECK("SCardEstablishContext", rv)

               rv = SCardConnect(hContext,mszReaders,

                         SCARD_SHARE_EXCLUSIVE,SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);

               CHECK("SCardConnect", rv);

               rv = SCardBeginTransaction(hCard);

               CHECK("SCardBeginTransaction", rv);

               printf("Enleve la carte, puis appuie sur une touche!\n");getchar();

               rv = SCardEndTransaction(hCard,SCARD_EJECT_CARD);

               CHECK("SCardEndTransaction", rv);

               rv = SCardDisconnect(hCard, SCARD_LEAVE_CARD);

               CHECK("SCardDisconnect", rv)

               rv = SCardReleaseContext(hContext);

               CHECK("SCardReleaseContext", rv)

               break;

      }

 

With the previous version, I had :

SCardEndTransaction:[80100069] Card was removed.


What is this "previous version" exactly?

Bye

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: SCardEndTransaction(hCard,SCARD_EJECT_CARD);

Christophe FERRANDO

Hi,

 

I should apologize.

I test with two differents readers with pcsclite version 1.8.16 and 1.8.17.

 

It appears that one of the reader doesn’t detect card insertion.

 

Christophe

 

 

De : Pcsclite-muscle [mailto:pcsclite-muscle-bounces+christophe.ferrando=[hidden email]] De la part de Ludovic Rousseau
Envoyé : vendredi 3 juin 2016 10:00
À : Talks about MUSCLE <[hidden email]>
Objet : Re: [Pcsclite-muscle] SCardEndTransaction(hCard,SCARD_EJECT_CARD);

 

2016-06-02 18:03 GMT+02:00 Christophe FERRANDO <[hidden email]>:

Hi,

 

Hello Christophe,
 

 

With the last pcsclite version, i have a return of ScardEndTransaction =

SCardEndTransaction:[8010001f] Feature not supported.

      case 577 : {

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

               CHECK("SCardEstablishContext", rv)

               rv = SCardConnect(hContext,mszReaders,

                         SCARD_SHARE_EXCLUSIVE,SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);

               CHECK("SCardConnect", rv);

               rv = SCardBeginTransaction(hCard);

               CHECK("SCardBeginTransaction", rv);

               printf("Enleve la carte, puis appuie sur une touche!\n");getchar();

               rv = SCardEndTransaction(hCard,SCARD_EJECT_CARD);

               CHECK("SCardEndTransaction", rv);

               rv = SCardDisconnect(hCard, SCARD_LEAVE_CARD);

               CHECK("SCardDisconnect", rv)

               rv = SCardReleaseContext(hContext);

               CHECK("SCardReleaseContext", rv)

               break;

      }

 

With the previous version, I had :

SCardEndTransaction:[80100069] Card was removed.

 

What is this "previous version" exactly?

Bye

--

 Dr. Ludovic Rousseau


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: SCardEndTransaction(hCard,SCARD_EJECT_CARD);

Ludovic Rousseau
2016-06-03 10:32 GMT+02:00 Christophe FERRANDO <[hidden email]>:

Hi,

 

I should apologize.

I test with two differents readers with pcsclite version 1.8.16 and 1.8.17.


The management of SCARD_EJECT_CARD in SCardEndTransaction() has not changed since years.

According to the source code [1] SCARD_EJECT_CARD will generate a "CTBCS command for Eject ICC" and return this command execution result.

You should use SCARD_EJECT_CARD only if your reader+driver can effectively mechanically eject the card.
Do you have such a reader?

 

It appears that one of the reader doesn’t detect card insertion.


That is a different issue.

Bye

[1] https://anonscm.debian.org/cgit/pcsclite/PCSC.git/tree/src/winscard.c#n1205

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle