views:

18

answers:

4

Hi There,

I am updating a smart card application (.net 2 using winscard.dll) to run on Windows 7. Only minor changes are required for 32bit. Under 64bit there appears to be a hang calling SCardConnectA - it sits and does not return. Stopping the smart card service/removing the card allows the application to complete.

The .net app uses interop so to rule this out, I have tried calling scardconnectA from a C++ Dll with the same result. This occurs on TODOS and Gemalto devices. So far in the application it has clearly setup and talked to the reader and determined presence of a card.

Any suggestions on how to investigate? Is there a timeout value I can apply here?

Thanks,

Davy Mitchell

+1  A: 

You would have to work with the respective manufacturers to arrive at a solution. You didn't post any snippet to verify that you did something wrong, I doubt it if you have double-checked the behavior in a native program. And there a few ways to fumble the arguments. Using the Unicode version, like everybody else does, would be a remote chance.

This is a difficult kind of support request, you are working with two parties, Microsoft and the card vendor, they are liable to point fingers at each other. Your only real hope for a quick workaround is to force your app to run in 32-bit mode by setting the Target platform setting to x86.

Hans Passant
Thanks Hans - some good suggestions in there. I'll report on any progress :-)
daftspaniel
+1  A: 

Most card readers inlcude a separate installer for 64 bit drivers and 32 bit drivers - gemalto definitely does this (see http://support.gemalto.com/?id=46 for an example page with multiple reader installers for different architectures).

Have you double checked to ensure that you are using 64 bit drivers under the 64bit OS?

Damien
Thanks - yes using 64bit drivers.
daftspaniel
+1  A: 
  • Why do you use SCardConnectA instead of SCardConnect?
  • A hanging SCardConnect can mean that there's another application doing something with that card, are you sure that this is not the case?
martin
Thanks for reply. 1) No particular reason - switching to Unicode version has same result. 2) No other app in use. Same set of operations works in 32bit. Can't see a reason for 64bit requiring different steps to read card (possible though).
daftspaniel