Click here to Skip to main content
11,414,670 members (68,817 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Windows Win7
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 6-Jan-13 1:04am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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

Check this link:
Microsoft dev center[^]

Hope it works out.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

compile ur code under 32, it's will work, or chose 32 in the properties of your project and recompile
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 9,160
1 OriginalGriff 7,487
2 Maciej Los 3,710
3 Abhinav S 3,298
4 Peter Leow 3,084


Advertise | Privacy | Mobile
Web04 | 2.8.150427.4 | Last Updated 22 Jan 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100