当前位置: 代码迷 >> WinCE >> wince 6.0 使用usbser.dll实现usb转串口,UsbAttachDevice异常,求指点!
  详细解决方案

wince 6.0 使用usbser.dll实现usb转串口,UsbAttachDevice异常,求指点!

热度:100   发布时间:2016-04-28 12:26:04.0
wince 6.0 使用usbser.dll实现usb转串口,UsbAttachDevice错误,求指点!!
  wince平台下利用源码的usbser.dll开发一款usbs转串口的打印机设备。UsbAttachDevice返回值错误,failure message
Drivers\USB\LoadClients\1155_22336\Default\10USBD:ConvertToClientRegistry, Registry Drivers\USB\LoadClients\1155_22336\Default\10 is exist
DLL:usbser.dll
USBD: Calling client attach proc:? M???
USBD: Calling client attach proc for USBSER_CLASS
Enter the callback function
+UsbClientDevice::InitUsbClientDevice::AttachUsbClientDevice::Attach(InterfaceOnly): Found Supported Interface (bInterfaceNumber=1,bAlternateSetting=0Before Get Path,m_hDriver=0
m_hDriver=0,RegPath=Drivers\USB\ClientDrivers\USBSER_CLASS
m_hDriver=0,RegPath=Drivers\USB\ClientDrivers\USBSER_CLASS
After Get Path
-UsbClientDevice::Init return 0Finished the callback function
USBD: Client did not accept control of device

注册表设置如下:
[HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\1155_22336\Default\10\USBSER_CLASS]
   "Prefix"="COM"
"Dll"="usbser.dll"

[HKEY_LOCAL_MACHINE\Drivers\USB\ClientDrivers\USBSER_CLASS]
   "Prefix"="COM"
   "Dll"="usbser.dll"
   "DeviceArrayIndex"=dword:1
   "RxBufferSize"=dword:4000
   "IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"

请问是注册表设置错误吗,求大牛指点!!
wince

------解决方案--------------------
既然是转串口,转换后的串口信息是不是不全啊
------解决方案--------------------
你这打印机是指本身CE就是打印机还是CE连接另外一台打印机

CE是做主还是做从
------解决方案--------------------
  "Prefix"="COM"
   "Dll"="usbser.dll"
   "DeviceArrayIndex"=dword:1


这里会不会直接打开真正的串口设备了呢?
而没跑到 USB 的驱动啊?
  相关解决方案