HidD_SetNumInputBuffers routine

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 __stdcall HidD_SetNumInputBuffers(
  _In_ HANDLE HidDeviceObject,
  _In_ ULONG  NumberBuffers
);

Parameters

HidDeviceObject [in]

Specifies an open handle to a top-level collection.

NumberBuffers [in]

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.

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

Target platform

Universal

Version

Available in Windows 2000 and later versions of Windows.

Header

Hidsdi.h (include Hidsdi.h)

Library

Hid.lib

DLL

Hid.dll

See also

HidD_GetNumInputBuffers
IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS

 

 

Send comments about this topic to Microsoft

Show: