Computing.Net > Forums > Programming > Read smart card using SCardTransmit

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Read smart card using SCardTransmit

Reply to Message Icon

Name: nivi
Date: September 19, 2003 at 02:38:19 Pacific
OS: windows xp
CPU/Ram: p3 proceesor,256mb Ram
Comment:

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?



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Read smart card using SCardTransmit

reading data from smart card www.computing.net/answers/programming/reading-data-from-smart-card/7887.html

E-card using ASP/Access www.computing.net/answers/programming/ecard-using-aspaccess/4253.html

scardlocatecards:smart card api c# www.computing.net/answers/programming/scardlocatecardssmart-card-api-c/16069.html