I am trying to build application in windows using the Winscard library to communicate with contactless smartcard reader. I am able to connect to the device but when I try so send some data using scardtransmit I get a error 16. I have attached the piece of code that I am using below
SCARD_IO_REQUEST pioSendPci = *SCARD_PCI_T1;
//SCARD_IO_REQUEST pioSendPci = *SCARD_PCI_RAW;
DWORD dwRecvLength;
BYTE pbRecvBuffer[258];
BYTE cmd1[260];
cmd1[0]= 0xA0;
cmd1[1]= 0x0D;
cmd1[2]= 0x01;
cmd1[3]= 0x00;
cmd1[4]= 0x01;
ULONG sendbuflen= 0x05;
dwRecvLength = sizeof(pbRecvBuffer);
rv2 = SCardTransmit(hCard, &pioSendPci , cmd1,sendbuflen ,NULL, pbRecvBuffer, &dwRecvLength);