User32GetRawInputDeviceInfo(IntPtr, UInt32, IntPtr, UInt32) Method

Retrieves information about the raw input device.

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", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static int GetRawInputDeviceInfo(
	IntPtr hDevice,
	uint command,
	IntPtr data,
	ref uint refSize
)

Parameters

hDevice  IntPtr
A handle to the raw input device.

This comes from the Device member or from GetRawInputDeviceList(RawInputDeviceList, UInt32, UInt32).

command  UInt32
Specifies what data will be returned in data.
data  IntPtr
A pointer to a buffer that contains the information specified by uiCommand. If command is RIDI_DEVICEINFO, set the cbSize member of RID_DEVICE_INFO to sizeof(RID_DEVICE_INFO) before calling GetRawInputDeviceInfo(IntPtr, GetRawInputDeviceInfoCommand, IntPtr, UInt32).
refSize  UInt32
The size, in bytes, of the data in data.

Return Value

Int32
If successful, this function returns a non-negative number indicating the number of bytes copied to data.

If data is not large enough for the data, the function returns -1. If data is NULL, the function returns a value of zero.

In both of these cases, refSize is set to the minimum size required for the data buffer.

Remarks

See Also