User32GetRawInputDeviceList(IntPtr, 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", SetLastError = true)]
public static uint GetRawInputDeviceList(
	IntPtr pRawInputDeviceList,
	ref uint refNumDevices,
	uint size
)

Parameters

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

If Zero, the number of devices are returned in refNumDevices parameter.

refNumDevices  UInt32
If pRawInputDeviceList is Zero, 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 pRawInputDeviceList 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

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

On any other error, the function returns -1 and GetLastWin32Error returns the error indication.

Remarks

See Also