【发布时间】:2018-09-03 21:40:13
【问题描述】:
我从 here 安装了 U.are.U 4500 fingerprint 传感器驱动程序
在安装它的文件夹中,它附带了一个 OPOS 项目示例(在 Visual Basic 中创建),我已经测试过它并且工作正常,所以我测试了我的下一个代码以使用 OPOS 设备:
List<string> retorno = new List<string>();
PosExplorer myPosExplorer = new PosExplorer();
DeviceCollection myDevices = myPosExplorer.GetDevices();
foreach (DeviceInfo dev in myDevices)
{
if (dev.Type == DeviceType.Biometrics)
{
retorno.Add(dev.ServiceObjectName);
}
}
由于某种原因,此代码未找到任何生物识别设备。我知道这种方法适用于其他 OPOS 设备(如 Msr、Scale、LineDisplay)。但是为什么它找不到生物识别和它能够做到的示例代码呢?我错过了什么吗?
我希望像使用其他所有设备(如 MSR、LineDisplay 等)一样使用此设备。示例here。
PS:我正在使用 c#、WPF 和 OPOS 框架 1.14。
【问题讨论】:
-
在
if (dev.Type == DeviceType.Biometrics)行放置一个断点。运行代码。每次遇到断点时,请查看 Watch Window 中的dev。是否有任何设备看起来像您的设备? -
如果我删除 de "if (dev.Type == DeviceType.Biometrics)" 我得到了我安装的其他设备的所有其他驱动程序,但没有一个是指生物识别指纹
-
我无法验证生物识别设备,但我尝试制作一些可能对您有帮助的东西。 AltCCOInterop还有源码,请试试看。
标签: c# fingerprint opos digital-persona-sdk