HidD_SetNumInputBuffers function

The HidD_SetNumInputBuffers routine sets the maximum number of input reports that the HID class driver ring buffer can hold for a specified top-level collection.

Syntax

BOOLEAN HidD_SetNumInputBuffers(
  HANDLE HidDeviceObject,
  ULONG  NumberBuffers
);

Parameters

HidDeviceObject

Specifies an open handle to a top-level collection.

NumberBuffers

Specifies the maximum number of buffers that the HID class driver should maintain for the input reports generated by the HidDeviceObject collection.

Return Value

HidD_SetNumInputBuffers returns TRUE if it succeeds; otherwise, it returns FALSE. Use GetLastError to get extended error information.

Remarks

Only user-mode applications can call HidD_SetNumInputBuffers. Kernel-mode drivers must use an IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS request.

If HidD_SetNumInputBuffers returns FALSE, and the Microsoft Win32 GetLastError function indicates that an invalid parameter was supplied, the value of NumberBuffers is invalid. The HID class driver requires a minimum of two input buffers. On Windows 2000, the maximum number of input buffers that the HID class driver supports is 200, and on Windows XP and later, the maximum number of input buffers that the HID class driver supports is 512. The default number of input buffers is 32.

For more information, see HID Collections.

Requirements

   
Minimum supported client Available in Windows 2000 and later versions of Windows.
Target Platform Universal
Header hidsdi.h (include Hidsdi.h)
Library Hid.lib
DLL Hid.dll

See Also

HidD_GetNumInputBuffers

IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS