Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
The portion of the sample program which we have used to read the data from the memory card is as follows:
SCARD_T0_COMMAND ib; ### structure as mentioned in the header file winsmcrd.h ##
LPSCARD_T0_REQUEST tt; ### structure as mentioned in the header file winsmcrd.h ##
DWORD hk=5,t=10;ib.bCla=00;
ib.bIns=0xB0;
ib.bP1=00;
ib.bP2=05;
ib.bP3=02;tran=SCardTransmit(card,SCARD_PCI_RAW,(LPCBYTE)&ib, t,NULL,(LPBYTE)&tt,&hk);
where card is the handle returned from SCardConnect.
The value returned by the function is 22 ie. the error code for Bad Command.
What is wrong with this procedure?Could you please inform us the procedure that should be followed to read data from a memory card using SCardTransmit.
Is there any difference in the procedure to read data from smartcard and memory card?
What is the ctlcode for reading data from the smartcard and memory card(that can be used in SCardControl)? Or can we define the ctlcodes? If so how to define them?

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |