Click here to Skip to main content
15,880,543 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i make a class called smartcard.cs using c# programming language

this class uses winscard and kernel32 libraries to connect to smart card and read data from it

my program works fine on X32 bits Windows

when i tried X64 windows 7 it works fine until select the smart card reader and try to connect

but when connect to the card using the function "SCardConnect" it returns 06 and as we know it must return 0 to be succeeded

when i debug i found that the context returned from function "SCardEstablishContext" =0 on x64 and equal some number on x86

what i must to do to make my program work on x64 as well?
Posted
Updated 12-Sep-19 1:40am

Hello, you may be using an old example that does not longer work.

Check this link:
Microsoft dev center[^]

Hope it works out.
 
Share this answer
 
compile ur code under 32, it's will work, or chose 32 in the properties of your project and recompile
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900