I had a working contactless system in Windows XP. But when I tried to run it under Win7 it fails in this sCardTransmit function even though it runs connect function well:
UCHAR ucAnswerL[255];
DWORD ucAnswerSizeL = 0;
BYTE m_send[256];
ucAnswerSizeL = 255;
m_send[0] = 0x00;
m_send[1] = 0x12;
m_send[2] = 0x00;
m_send[3] = 0x00;
m_send[4] = 0x00;
m_ls = 5;
uiRc = SCardTransmit(m_hSmartCardHandle, (m_dwAP==SCARD_PROTOCOL_T0?SCARD_PCI_T0:SCARD_PCI_T1), m_send, m_ls, NULL, ucAnswerL, &ucAnswerSizeL);
uiRc is set to 801000002 which means:
public const uint E_CANCELLED = 0x80100002;
The same code in XP system returns 0 (success).
What should be the problem?
Btw. Where can I find the instruction codes sent in pbSendBuffer mentioned here:
User contributions licensed under CC BY-SA 3.0