[Pcsclite-muscle] SCardGetAttrib
Ludovic Rousseau
ludovic.rousseau
Fri Jun 3 00:33:30 PDT 2016
2016-06-02 18:16 GMT+02:00 Christophe FERRANDO <
christophe.ferrando at sylyca.com>:
> 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.
The windows list is at
https://msdn.microsoft.com/fr-fr/library/windows/desktop/aa374738%28v=vs.85%29.aspx#smart_card_return_values
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20160603/1046fb52/attachment.html>
More information about the pcsclite-muscle
mailing list