title: How to find the device instance id of a PCSC reader
body: <p>Having only a handle and context to a PCSC reader using <code>winscard</code> on Windows >= XP, is there some way to get its device instance id or something else that can be used in the <code>SetupDi*</code> API to find out which driver is loaded for said reader.</p>
  
  <p><code>SCardGetReaderDeviceInstanceId</code> is only available on Windows 8, so unfortunately not for me.</p>
  
  <p>As a plan B, all smart card readers could be enumerated in <code>SetupDi</code> using the smart card reader class guid. But then I would need a <em>unique</em> attribute to be able to correlate a reader between <code>SCard*</code> API and <code>SetupDi*</code> API. For example, the serial number sounds like a good candidate, but not all manufacturers use it.</p>
  
  <p>Any ideas? </p>