Hi,
Currently I am facing problem regarding the Smart Card transmit function
I am programming using winscard.dll in
VB.
I am able to perform the operations like ScardConnect, ScardEstablishContext, ScardListReaders successfully
But when I am Transmitting bytes(APDU) to the reader, I am getting return bytes 6D 00 as status bytes (Sw1, sw2) as opposed to 90 00
I am using Reader: Gemplus PC 410-SL on Windows 2000 Professional
Please guide me on following Sample Code snippet regarding, where am lacking.
Function: SCardTransmit
Dim byReadBuffer As BytArray
Dim bytCommand As BytArray
bytCommand.byBytes(0) = &H0
bytCommand.byBytes(1) = &HA4
bytCommand.byBytes(2) = &H1
bytCommand.byBytes(3) = &H0
bytCommand.byBytes(4) = &H5
Dim leng As Long
leng = 255
lResult = SCardTransmit(hCard, 0, bytCommand, 7, 0, byReadBuffer, leng)
If lResult <> SCARD_S_SUCCESS Then ' It returns Success
MsgBox "Select File Failed", vbInformation
Exit Sub
End If
szMessage = "MessageRead: " + DecimalToString(byReadBuffer, leng, True)
Message.Text = szMessage ' Gives status bytes as 6D 00
Regards ,
Sunita