Sam-Hall / NFC-HID-Emulate

Listens for an NFC tag, returning the serial number as a series of key strokes
6 stars 4 forks source link

Fast user switching on Windows 7 seems to kill PyScard #3

Open Sam-Hall opened 9 years ago

Sam-Hall commented 9 years ago

Switching users immediately results in a ListReadersException, which currently kills the process.

The fix would involve waiting until the user switches back then attempting to re-establish a connection with the reader. So far implementing this hasn't worked out so well, PyScard continues throwing ListReadersException until the process is restarted. May have to reload PyScard some how.

Sam-Hall commented 9 years ago

On Windows, I have created a wrapper process that does the following:

If hidemu terminates, it repeats the process.

This allows multiple users to run hidemu on the same machine as only the wrapper process running on the active desktop will try to start hidemu. It's unlikely I'll get around to porting this to python anytime soon though.