Bewerken

Delen via


HidD_SetNumInputBuffers function (hidsdi.h)

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(
  [in] HANDLE HidDeviceObject,
  [in] ULONG  NumberBuffers
);

Parameters

[in] HidDeviceObject

Specifies an open handle to a top-level collection.

[in] 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

Requirement Value
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