02-16-2009 05:49 PM
Hi all,
I have read some of the post from 2006, it has help me some what but I am still stuck. I can communicate with the card reader SCR335 as far as getting the card reader list. When I use the winscard.dll to get the status of the card, I get "6" that doens't mean anything to me. I am including what I have done so far but I still need to read the smart card. I had also used two third pary active X control but not getting anywhere either. One from Priore and one from SCardX_Easy. Thanks in advance.
Peter N
Solved! Go to Solution.
02-17-2009 04:20 PM
Peter,
Have you seen this thread? There is at least one code example.
http://forums.ni.com/ni/board/message?board.id=170&requireLogin=False&thread.id=161979
02-17-2009 09:56 PM
I did faced the same problem last time. I developed the application in XP and it works fine. But when i run the exe on vista, i got that error 6 you are telling.
What i did is just copy the winscard.dll from the PC from where i developed the application and pasted it on the another PC in which Vista is ruuning. That solved the problem.
So you are going to give me a bit more details please.
1) In what OS you developed the application"
2) In what OS you got this 6?
3) What LabVIEW version you are using?
4) Are you using the latest version of Winscard.dll?
5) Are you using the certified release dll in your application?
Thanks,
Mathan
02-18-2009 12:16 AM
http://forums.ni.com/ni/board/message?board.id=170&thread.id=381458&view=by_date_ascending&page=1
Also please go through this thread just for your reference.
02-18-2009 11:00 AM
Hi Mathan,
Just to answer a couple of things here.
/////////////////////////////////////////////////////////////////
So you are going to give me a bit more details please.
1) In what OS you developed the application"
2) In what OS you got this 6?
3) What LabVIEW version you are using?
4) Are you using the latest version of Winscard.dll?
5) Are you using the certified release dll in your application?
Thanks,
Mathan
//////////////////////////////////////////////////////////////////////I am using XP and not dealing with Vista at this time.
I am using labview 8.6
I don't know if I have the latest version of winscard.dll. I just got this labtop so I assumed that it should be the latest. I will download the latest anyway.
About certified release dll???? Which dll are you refering to?
Thanks
P
02-18-2009 09:48 PM
I don't have access to LabVIEW right now. Could you please post a screen shot of your vi along with the dll function declaration parameters screen. Forget about the certified release dll talk.. It was about my last project where i just used winscard.dll just to establish communication with the reader and then another dll which is a microsoft certified one that controls the functions of the USB device.
So what in ur case? Are you using only winscard.dll to control all the functions of your device?
Thanks,
Mathan
02-19-2009 03:22 PM
Well... I get the program to connect to the reader now. The thing is sometimes it work and other time it doesn't. The scardconnect is what I am using right now. Sometime I can get the ATR from the card. When I come in the morning it would work and then for hours later it wouldn't work. Any of you experienced this?
Regards,
Peter
02-20-2009 07:20 AM - edited 02-20-2009 07:21 AM
I found out where it went wrong. Just see the below picture. Remove the input to hcardhandle (you have connected 0 to it which inconsistently caused the problem). Post if still problems occur.
Thanks,
Mathan
02-20-2009 09:34 AM
thanks Mathan,
Here's my latest and still doens't work all the time. I also use the activeX demo from Scard Soft. My program is some what consistent with this demo. When the demo work (connect to the card) my program would also work. I am suspecting something is up with the winscard.dll.
Thanks,
P
02-20-2009 11:31 PM
Dear Peter,
Here are some of the modifications i did in your program. I am sure this will definitely work consistently without any issues. Post me if still problems are there.
1) In scardconnect function, give 2 to sharedmode input and 3 to protocol selection (either T0 or T1).
2) In scardstatus function, no need to connect input to the middle 4 values, just assign some value to atrlen parameter (should be greater than or equal to the actual length of the ATR.)
3) In scarddisconnect funtion, for dwdisposition parameter pass a value of 3 rather than 1.
4) Include scardfreememory function before scardreleasecontext function.