> Sorry, Dave but I don't get it.
> (I mean 90 00 , 61 XX, and so on). I only catch data values. dwRecvLength seems
> to return only length of data and not lengthdata+2 (statusword)
dwRecvLength does equal lengthdata+2 for me, but I modified
SCardTransmit() to fix a minor bug (its been reported). Without looking
more closely, I do not know if this is the same bug or a different one.
If it is the same bug, initialize dwRecvLength with a value before giving
it to SCardTransmit.
the status code should be stored the last two bytes of the recieve buffer.
Here is a series of APDU I send (verifyKey aut0 first):
Sending: 00 e0 00 00 10 1f 0a 12 34 02 01 00 00 ff 00 00 ff 00 00 00 00
Recieve: 90 00
Sending: 00 a4 00 00 02 12 34
Recieve: 61 0f
Sending: 00 d6 00 00 0c 01 02 03 04 05 06 07 08 09 ab cd ef
Recieve: 90 00
Sending: 00 b0 00 00 0c
Recieve: 01 02 03 04 05 06 07 08 09 ab cd ef 90 00
Sending: 00 e4 00 00 02 12 34
Recieve: 90 00
The last two bytes of recieve is the status code.
For example, the 3rd line from bottom is the result of a ReadBinary (00 b0
00 00 0c). The last two bytes 90 00 indicates a success.
hope this is useful.
-son
***************************************************************
Linux Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/smartcard/index.html
***************************************************************