Thanks, 

I understand now,

Have a nice day,

 

Christophe FERRANDO

 

De : Pcsclite-muscle 
[mailto:pcsclite-muscle-bounces+christophe.ferrando=sylyca....@lists.alioth.debian.org]
 De la part de Ludovic Rousseau
Envoyé : mercredi 28 septembre 2016 09:59
À : Talks about MUSCLE <[email protected]>
Objet : Re: [Pcsclite-muscle] ScardConnect SCARD_SHARE_DIRECT

 

2016-09-27 23:50 GMT+02:00 Christophe FERRANDO <[email protected] 
<mailto:[email protected]> >:

Hello,

 

Hello Christophe,
 

 

 

I am working on some tests for my product.

 

On of the test says :

 

Insert a card who does not support RAW PROTOCOL (A french health card : Vitale) 
: OK

 

First, call :

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

OK

 

Second, the return should be SCARD_E_NOT_READY

rv = SCardConnect(hContext,mszReaders,SCARD_SHARE_DIRECT,

                                                               -1, &hCard, 
&dwActiveProtocol);

 

The result is every time SUCCESS, even with no card, with RAW_PROTOCOL instead 
of -1, …

 

I don’t think i can have an error with this test ?

 

Any idea, how can i have the return SCARD_E_NOT_READY, which is present in the 
documentation of SCARD_CONNECT.


SCARD_E_NOT_READY is not used by any pcsc-lite function.

SCARD_SHARE_DIRECT (on pcsc-lite) is used to talk to the reader, not to the 
card. So it is normal that you do not get an error if the card is not present 
or not responding.

The pcsc-lite API for SCardConnect() is at:
https://pcsclite.alioth.debian.org/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5

 

A list of (major) differences between Windows PC/SC and pcsc-lite is available 
at https://pcsclite.alioth.debian.org/api/group__API.html#differences

Bye

-- 

 Dr. Ludovic Rousseau

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

Reply via email to