User32GetRawInputDeviceList(RawInputDeviceList, UInt32, UInt32) Method

Enumerates the raw input devices attached to the system.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)]
public static int GetRawInputDeviceList(
	RawInputDeviceList[] rawInputDeviceList,
	ref uint refNumDevices,
	uint size
)

Parameters

rawInputDeviceList  RawInputDeviceList
An array of RawInputDeviceList structures for the devices attached to the system.

If NULL, the number of devices are returned in refNumDevices.

refNumDevices  UInt32
If rawInputDeviceList is NULL, the function populates this variable with the number of devices attached to the system; otherwise, this variable specifies the number of RawInputDeviceList structures that can be contained in the buffer to which rawInputDeviceList points.

If this value is less than the number of devices attached to the system, the function returns the actual number of devices in this variable and fails with ERROR_INSUFFICIENT_BUFFER.

size  UInt32
The size of a RawInputDeviceList structure, in bytes.

Return Value

Int32
If the function is successful, the return value is the number of devices stored in the buffer pointed to by rawInputDeviceList.

On any other error, the function returns -1.

Remarks

See Also