如何是PCSC智能卡阅读器“好记的名称”构造?
我用WinSCard列出所有的读者,这给了我这样一个清单:
I use WinSCard to list all readers, which gives me a list like this:
ASK RDR4x7 0
SCM Microsystems Inc. SCR3320 USB Smart Card Reader 0
SCM Microsystems Inc. SCR3320 USB Smart Card Reader 1
SCM Microsystems Inc. SCR3320 USB Smart Card Reader 2
这是伟大的,但我没有哪个名字属于线索哪个读卡器。
Which is great, but I have no clue which name belongs to which card reader.
在哪里这些名字从何而来?它们是如何构建的?
我已经找到了到现在为止:在注册表中,有一个 HKEY_LOCAL_MACHINE \系统\ CurrentControlSet \服务
键。在此项下,你可以找到相匹配的读卡器的服务(我发现通过查询WMI注册表)子项。例如:在 SCM Microsystems公司SCR3320 USB智能卡读卡器
读者服务 SCR3XX2K
What I've found up until now: in the registry, there is a HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
key. Under this key, you can find the subkey which matches the card reader's "service" (which I found by querying the WMI registry). For example: the service for the SCM Microsystems Inc. SCR3320 USB Smart Card Reader
readers is SCR3XX2K
.
该子项( SCR3XX2K
)的另一个子枚举
,其中有多个有趣的值:
This subkey (SCR3XX2K
) has another subkey Enum
, which has multiple interesting values:
-
计数
:DWORD,读者连接的数量 -
0
,1
,2
:STRING,硬件设备ID
-
Count
: DWORD, the number of readers connected -
0
,1
,2
: STRING, hardware Device ID
我想这些都是附加在友好名称的数字,但我想不出名字怎么串构造。我需要这个硬件设备ID的(这是我通过WMI获得)映射到它们的友好名称。
I guess these are the numbers appended to the 'friendly names', but I can't figure out how the name string is constructed. I need this to map hardware Device ID's (which I get through WMI) to their friendly name.
那么,什么是用于创建一个友好名称为智能卡阅读器的模式,并在做价值从何而来?
他们是这3个属性的concatination:
They are a concatination of these 3 attributes:
SCARD_ATTR_VENDOR_NAME
SCARD_ATTR_VENDOR_IFD_TYPE
SCARD_ATTR_DEVICE_UNIT
TechNet文章智能卡活动一>智能卡读写器名称一节中记录这一点。
The TechNet article Smart Card Events documents this in the "Smart Card reader name" section.
SCARD _ ???
属性要求与 SCardGetAttrib
的功能。
在 SCARD_ATTR_DEVICE_SYSTEM_NAME
属性返回友好名称
当你同时列出了读者的。
The SCARD_ATTR_DEVICE_SYSTEM_NAME
attribute returns the friendly name
as the ones you get while listing the readers.
在注册表中存在智能卡阅读器列表下的 HKLM \ SOFTWARE \微软\加密\加莱\读者
。读者被添加到该列表由SCR驱动器的INF文件,所以驱动程序安装期间
The list of SmartCard readers exists in the registry under HKLM\SOFTWARE\Microsoft\Cryptography\Calais\Readers
. Readers are added to this list by the INF file of the SCR driver, so during driver installation.
设备和读卡器之间的联系可以在SmartCardReader类 {50DD5230-BA8A-11D1-BF5D-0000F805F530}
下找到HKLM\SYSTEM\CurrentControlSet\Control\Class\{50DD5230-BA8A-11D1-BF5D-0000F805F530}$c$c>.
A link between device and reader can be found in the SmartCardReader class {50DD5230-BA8A-11D1-BF5D-0000F805F530}
under HKLM\SYSTEM\CurrentControlSet\Control\Class\{50DD5230-BA8A-11D1-BF5D-0000F805F530}
.