SCardGetAttrib

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

SCardGetAttrib

Christophe FERRANDO

Hi,

 

With the last pcsclite version, i get this error :

SCardGetAttrib:[8010001f] Feature not supported.

 

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

               CHECK("SCardEstablishContext", rv)

               rv = SCardConnect(hContext,mszReaders,

                         SCARD_SHARE_EXCLUSIVE,SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);

              dwAttrLen = SCARD_AUTOALLOCATE;

              rv = SCardGetAttrib(hCard,SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE,(unsigned char*)&pbAttr,&dwAttrLen);

              CHECK("SCardGetAttrib", rv);

              rv = SCardFreeMemory(hContext,pbAttr);

              CHECK("SCardFreeMemory", rv);

              rv = SCardDisconnect(hCard, SCARD_LEAVE_CARD);

              CHECK("SCardDisconnect", rv)

              rv = SCardReleaseContext(hContext);

              CHECK("SCardReleaseContext", rv)

              break;

 

I expect 0x00000032, ERROR_NOT_SUPPORTED (0x32)

 

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: SCardGetAttrib

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

Hi,


Hello Chirstophe,

 

With the last pcsclite version, i get this error :

SCardGetAttrib:[8010001f] Feature not supported.

 

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

               CHECK("SCardEstablishContext", rv)

               rv = SCardConnect(hContext,mszReaders,

                         SCARD_SHARE_EXCLUSIVE,SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);

              dwAttrLen = SCARD_AUTOALLOCATE;

              rv = SCardGetAttrib(hCard,SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE,(unsigned char*)&pbAttr,&dwAttrLen);

              CHECK("SCardGetAttrib", rv);

              rv = SCardFreeMemory(hContext,pbAttr);

              CHECK("SCardFreeMemory", rv);

              rv = SCardDisconnect(hCard, SCARD_LEAVE_CARD);

              CHECK("SCardDisconnect", rv)

              rv = SCardReleaseContext(hContext);

              CHECK("SCardReleaseContext", rv)

              break;

 

I expect 0x00000032, ERROR_NOT_SUPPORTED (0x32)


ERROR_NOT_SUPPORTED is not a PC/SC error, even on Windows.

I think it is a bug on the Windows side. Either the windows code is bogus or the Windows documentation is wrong.
Maybe you should report the problem to Microsoft?

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: SCardGetAttrib

Christophe FERRANDO

Sure, you’re right.

 

It’s a documentation problem, I should have read the return code of pccslite before posting to the list.

 

Have a nice day,

 

Christophe

 

De : Pcsclite-muscle [mailto:pcsclite-muscle-bounces+christophe.ferrando=[hidden email]] De la part de Ludovic Rousseau
Envoyé : vendredi 3 juin 2016 09:34
À : Talks about MUSCLE <[hidden email]>
Objet : Re: [Pcsclite-muscle] SCardGetAttrib

 

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

Hi,

 

Hello Chirstophe,

 

With the last pcsclite version, i get this error :

SCardGetAttrib:[8010001f] Feature not supported.

 

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

               CHECK("SCardEstablishContext", rv)

               rv = SCardConnect(hContext,mszReaders,

                         SCARD_SHARE_EXCLUSIVE,SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);

              dwAttrLen = SCARD_AUTOALLOCATE;

              rv = SCardGetAttrib(hCard,SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE,(unsigned char*)&pbAttr,&dwAttrLen);

              CHECK("SCardGetAttrib", rv);

              rv = SCardFreeMemory(hContext,pbAttr);

              CHECK("SCardFreeMemory", rv);

              rv = SCardDisconnect(hCard, SCARD_LEAVE_CARD);

              CHECK("SCardDisconnect", rv)

              rv = SCardReleaseContext(hContext);

              CHECK("SCardReleaseContext", rv)

              break;

 

I expect 0x00000032, ERROR_NOT_SUPPORTED (0x32)


ERROR_NOT_SUPPORTED is not a PC/SC error, even on Windows.

 

I think it is a bug on the Windows side. Either the windows code is bogus or the Windows documentation is wrong.

Maybe you should report the problem to Microsoft?

 

Bye

--

 Dr. Ludovic Rousseau


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