On 25/03/07, matheus ribeiro <[EMAIL PROTECTED]> wrote:
Hi,

Hello,

yes, Im using the function with a 0 timeout. Thats a valid thing in
Windows API. Windows monitors card status all the time and when you
call SCardGetStatusChange with 0 timeout it returns events that
happened.

Events that happened since when?

I don't think it will return the individual events. But just that
something changed and you will get the latest state in dwEventState.

Otherwise, it return SCARD_TIMEOUT. Thats not the same
behavior as linux.

In Linux, if I understood your code correctly, you have the deamon
monitoring cards all the time and pcsc calls just use shared memory to
retrieve information from deamon.

Exact.

My suggestion is to make a similar solution like windows did. Make
pcsc deamon keep a counter of events in higher bits of dwEventState
and whenever an event happens, increase this counter.

Is this a _documented_ feature of SCardGetStatusChange()? I can't find
it is MSDN.

In this situation, when client removes insert card between calls, the
change will be detected. Even though the SCARD_STATE_PRESENT was set
before and after the call.

Im not sure if I was clear enough, if not just ask =)

It is clear. I think you are relying on a undocumented feature of the
Windows SCardGetStatusChange(). I am not sure it is a good idea.

Implementing such a feature in pcsc-lite may not be easy. But, as
always, patches are welcome :-)

Regards,

--
 Dr. Ludovic Rousseau
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to