Click here to Skip to main content
12,350,134 members (25,717 online)
Rate this:
 
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 0: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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 22 Jan 2015
Copyright © CodeProject, 1999-2016
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