Open k0nagy opened 3 years ago
Thank you, if you can send a pull request, I can analyze it and merge it if everything works correctly
Hi,
I tried, but I don't have right, I get a 403 error code. I'd attached here the cs file. NFCReader.zip
Oh why is it? Did you fork and did your fix and create a PR?
Hi!
Thank you for your code it is very usefull.
The worker never returns from its thread. Here is a fix:
` BackgroundWorker worker = sender as BackgroundWorker;
Other fix: ` public void Disconnect() { if (connActive) { retCode = Card.SCardDisconnect(hCard, Card.SCARD_UNPOWER_CARD); if (retCode == 0) { _worker?.CancelAsync(); connActive = false; } } //retCode = Card.SCardReleaseContext(hCard); }
public void Watch() { this.RdrState = new Card.SCARD_READERSTATE(); readername = GetReadersList()[0]; this.RdrState.RdrName = readername;
`
You need an implement: public class NFCReader : IDisposable
Kind regards, Karoly