Results 1 to 2 of 2
For a program I am writing at work, I need to authorise ppl using a smartcard. Now, I manage to verify that there is a card in the cardreader by ...
- 11-24-2008 #1Just Joined!
- Join Date
- Nov 2008
- Posts
- 25
[SOLVED] SCardConnect succeeding without handle
For a program I am writing at work, I need to authorise ppl using a smartcard. Now, I manage to verify that there is a card in the cardreader by calling SCardConnect. The result of the call is SCARD_S_SUCCESS, as it should be, however, the handle has not been set to a valid value. Anyone has any idea what could be wrong?
I'm running OpenSuse 10.3, PCSC-lite 1.4.102 and have an ASEDriveIII by Athena SCS.
Below is the code I'm using:
Code:long rv ; SCARDHANDLE card_handle ; DWORD card_protocol ; rv = SCardConnect(g_card_context, g_reader_name, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1, &card_handle, &card_protocol) ;
- 11-25-2008 #2Just Joined!
- Join Date
- Nov 2008
- Posts
- 25
After a long mailchat with an employee from the manufacturer of my reader and some brainstorming on my own part, I've managed to solve this one. For some reason, when I declared the Card handle locally, it would not accept it and the handle would be set to 0. I now declared it globally and it works.


