User32GetRegisteredRawInputDevices Method

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

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 GetRegisteredRawInputDevices(
	RawInputDevice[] rawInputDevices,
	ref uint refNumDevices,
	uint size
)

Parameters

rawInputDevices  RawInputDevice
An array of RawInputDevice structures for the application.
refNumDevices  UInt32
The number of RawInputDevice structures in *pRawInputDevices.
size  UInt32
The size, in bytes, of a RawInputDevice structure.

Return Value

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

If the rawInputDevices buffer is too small or NULL, the function sets the last error as ERROR_INSUFFICIENT_BUFFER, returns -1, and sets refNumDevices to the required number of devices.

If the function fails for any other reason, it returns -1.

Remarks

See Also