GetRegisteredRawInputDevices function

Retrieves the information about the raw input devices for the current application.

Syntax

UINT GetRegisteredRawInputDevices(
  PRAWINPUTDEVICE pRawInputDevices,
  PUINT           puiNumDevices,
  UINT            cbSize
);

Parameters

pRawInputDevices

Type: PRAWINPUTDEVICE

An array of RAWINPUTDEVICE structures for the application.

puiNumDevices

Type: PUINT

The number of RAWINPUTDEVICE structures in *pRawInputDevices.

cbSize

Type: UINT

The size, in bytes, of a RAWINPUTDEVICE structure.

Return Value

Type: UINT

If successful, the function returns a non-negative number that is the number of RAWINPUTDEVICE structures written to the buffer.

If the pRawInputDevices buffer is too small or NULL, the function sets the last error as ERROR_INSUFFICIENT_BUFFER, returns -1, and sets puiNumDevices to the required number of devices. If the function fails for any other reason, it returns -1. For more details, call GetLastError.

Remarks

To receive raw input from a device, an application must register it by using RegisterRawInputDevices.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll

See Also

Conceptual

RAWINPUTDEVICE

Raw Input

Reference

RegisterRawInputDevices