我正在使用摩托罗拉 DS4208 手持式条码阅读器。过去我能够成功设置和使用此设备,但最近它已停止工作。这可能是安装其他设备的结果,这些设备也将 OPOS 和 POS 用于 .Net 接口。
这是一个 USB 设备,因此我创建了一个名为 *Moto_Scanner.xml* 的控制配置文件并将其放置在正确的位置。
<PointOfServiceConfig Version="1.0">
<ServiceObject Type="Scanner" Name="Example Scanner">
<HardwareId
From="HID\VID_05E0&PID_1300&REV_0100"
To="HID\VID_05E0&PID_1300&REV_0100" />
<HardwareId
From="HID\VID_05E0&PID_1300"
To="HID\VID_05E0&PID_1300" />
</ServiceObject>
</PointOfServiceConfig>
使用 SOMgr.exe,我可以在 POSDevices 中看到具有正确路径的设备。然后我创建了一个 MotoScan 的逻辑名称。然后它按预期出现在逻辑名称列表中。
使用 Microsoft Point Of Service\SDK\Samples\Sample Application\TestApp.exe 我可以打开并声明设备。但是,在尝试单击启用复选框后,我收到以下错误消息。
POSControlException ErrorCode(Failure) ExtendedErrorCode(0) occurred: Unable to enable the device. See inner exception for details.
System.ComponentModel.Win32Exception: The process cannot access the file because it is being used by another process
at Microsoft.PointOfService.ExampleServiceObjects.HidReader.HidThread.StartReading()
at Microsoft.PointOfService.ExampleServiceObjects.HidReader.OpenDevice()
at Microsoft.PointOfService.ExampleServiceObjects.ExampleScanner.set_DeviceEnabled(Boolean value)
Opened device: Example Scanner
Created instance of device: Example Scanner
摩托罗拉提供了一个名为 123Scan 的应用程序来协助配置和测试。使用这个应用程序,我可以确认设备工作正常。作为故障排除的一部分,该应用程序最终被卸载。
任何建议将不胜感激。