|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Synchronization question..
From: Eric Perlin (ericperl
WINDOWS.MICROSOFT.COM)
Date: Tue May 27 2003 - 15:16:35 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Q1: You're correct. There is no way to detect a transaction on a card.
You can just tell if the card is in use by another application with
SCardGetStatusChange.
Q2: SCardTransmit is thread safe because it implicitely holds the card
while it executes.
Transaction were introduced to guaranty that a sequence of commands can
not be disturbed by another application.
Many macro commands require multiple APDUs (SELECT on T=0 cards,
challenge/response authentication, ...).
Eric Perlin [MS]
-----Original Message-----
From: SmartCardSDK [mailto:SmartCardSDK
DISCUSS.MICROSOFT.COM] On Behalf
Of Stanley Key
Sent: Monday, May 26, 2003 7:54 AM
To: SmartCardSDK
DISCUSS.MICROSOFT.COM
Subject: Synchronization question..
Hi everybody,
There's couple of things about Resource Manager and Smartcard API I cant
understand:
1. I found no way to determine if the card is locked, i mean - if
another
thread/proccess called SCardBeginTransaction for this card.
SCardBeginTransaction takes no parameter specifying the waiting time and
will hung until the other thread calls SCardEndTransaction. I just need
some function like WaitForSingleObject for which you can specify a
timeout.
Is there really no way to find out if a card is locked???
2. Is SCardTransmit not thread-safe? I mean if thread1 calls
SCardTransmit,
and then thread2 calls it too while thread1 is still executing
SCardTransmit, thread2 will be retrieved with what? - or it will hung
until
thread1 leaves SCardTransmit?
If you can clarify these for me, please do!
Thanx in advance,
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]