Reputation: 23
I've been googling for a long time looking for an adequate example so I can check if "Smartcard-reader" is turned on or not. I noticed the change in Device Manager as in the picture. enter image description here
the only thing i could find for now is this PDF, but i couldn't come up with a solution yet. http://downloads.acs.com.hk/drivers/en/API-ACR122U-2.02.pdf
How could I check through the code itself whether this Smartcard-Leser is turned on via USB or not?
Thanks to everyone for their help.
Upvotes: 0
Views: 377
Reputation: 23
I found a solution :
ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_PnPEntity");
foreach (ManagementObject queryObj in searcher.Get())
{
if(queryObj["Description"].Equals("ACR122 Smart Card Reader"))
{
//smard card reader found
}
}
Upvotes: 2