none
HidD_SetNumInputBuffers and HidD_GetFeature of Hid.lib can’t return and will hang the application on Windows 10 RRS feed

  • Question

  • While porting our application to Windows 10, it is found that HidD_SetNumInputBuffers and HidD_GetFeature of Hid.lib can’t return and will hang the application. After updating to the latest SDK, the issue still exists. Furthermore, it is interesting that the HidD_GetNumInputBuffers and HidD_SetFeature can work normally.

    The application can work normally on Windows 7, Windows 8 and Windows 8.1. And it can also work normally with another HID interface which Usage Page is 0xFF8C on Windows 10.

    Development Environment:

    OS: Windows 10 32 bit

    Device: Barcode Scanner

    Interface: USB HID

    Usage ID: 0x0002

    Usage Page: 0x008C

    Programming Language: C++

    Why can't these functions work normally? Any comment would be helpful. Thanks.



    Wednesday, October 14, 2015 5:35 AM

Answers

  • The root cause is that the USB HID Barcode scanner (usage page is 0x008C) will be automatically identified as POS HID Barcode scanner device which uses hidscanner.dll as device driver. After changing the device driver to hidclass.sys, the issue disappears.

    I am wondering whether the device can use hidclass.sys as default driver, then the application code won't change. 
    Friday, October 23, 2015 12:50 AM

All replies

  • I tried https://github.com/Microsoft/Windows-driver-samples/tree/master/hid/hclient today. In OpenHidDevice() of pnp.c, below code is added after line 368 to test the HidD_SetNumInputBuffers function, which also hangs the sample application. 

    bRet = HidD_SetNumInputBuffers(HidDevice->HidDevice, 512);

    This might be a compatible issue between hid.lib and Windows 10 for usage page 0x008C.

    Friday, October 16, 2015 3:56 PM
  • Hi Alvinlee,

    is this a Honeywell barcode reader by any chance? (0xFF8C is used for the REM interface there)

    I have the same issue and my code (dfUsbLib) worked with that interface since 1999 on all windows version so far.

    Thursday, October 22, 2015 9:53 AM
  • The root cause is that the USB HID Barcode scanner (usage page is 0x008C) will be automatically identified as POS HID Barcode scanner device which uses hidscanner.dll as device driver. After changing the device driver to hidclass.sys, the issue disappears.

    I am wondering whether the device can use hidclass.sys as default driver, then the application code won't change. 
    Friday, October 23, 2015 12:50 AM
  • Hi Alvinlee,

    is this a Honeywell barcode reader by any chance? (0xFF8C is used for the REM interface there)

    I have the same issue and my code (dfUsbLib) worked with that interface since 1999 on all windows version so far.

    Hi Dieter.Fauth,

    My device is a Honeywell barcode scanner.

    Friday, October 23, 2015 12:52 AM