我正在使用摩托羅拉DS4208手持式條形碼閱讀器。在過去,我能夠成功地安裝和使用此設備,但最近它已停止工作。這可能是安裝其他設備的結果,這些設備也使用OPOS和POS用於.Net接口。無法啓用聲稱的設備使用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的LogicalName。然後,按預期方式出現在「邏輯名稱」列表中。
使用Microsoft服務點\ SDK \樣本\示例應用程序\ 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的應用程序來協助配置和測試。使用這個應用程序,我可以確認設備的工作。這個應用程序最終作爲故障排除的一部分被卸載。
任何建議,將不勝感激。
@bluefeet:更新了帖子 – 2013-11-19 17:32:08