Getting the "name" of the smartcard for SCardGetCardTypeProviderName()
In order to get a crypto context from CryptAcquireContext(), I need to
know the provider name for the smartcard currently in the slot.
According to the documentation, SCardGetCardTypeProviderName() will do
this, but param 2 is the card name, and I can't see how to determine this
non-interactively. All the documentation/examples I've seen either harcode
a name or rely on SCardUIDlgSelectCard(), which displays a UI.
Similarly reading around SCardLocateCards(), although it takes a list of
smartcard names (for which I'm populating from SCardListCards(), it
doesn't seem to pass back anything that identifies the name of the
smartcard inserted.
I suspect I'm missing something obvious, but I can't see what.
No comments:
Post a Comment