I\'m trying to send APDU commands to the card reader itself instead of the Smart Card. The test command I\'m using turns the RF field on and off.
This commands sends ove
I had a similar experience calling SCardTransmit after SCardConnect (receiving ERROR_INVALID_HANDLE <0x6> from SCardTransmit).
As an experiment, putting Thread.Sleep(100) after SCardTransmit seemed to change the error code from 0x6 to SUCCESS after the sleep statement (as viewed in debugger). This is not a solution but a hint in the right direction. Writing thread safe code to process the statements after SCardControl would be a better way.
The following link is a good reference:
https://www.csharpstar.com/csharp-race-conditions-in-threading/