User32GetRawInputDeviceInfo(IntPtr, GetRawInputDeviceInfoCommand, 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", SetLastError = true)]
public static uint GetRawInputDeviceInfo(
	IntPtr hDevice,
	GetRawInputDeviceInfoCommand uiCommand,
	IntPtr pData,
	ref uint refSize
)

Parameters

hDevice  IntPtr
A handle to the raw input device.

This comes from the lParam in WM_Input, from the Device member of RawInputHeader structure, or from GetRawInputDeviceList(RawInputDeviceList, UInt32, UInt32) function.

It can also be Zero if an application inserts input data, for example, by using SendInput(Int32, Input, Int32) fcuntion.

uiCommand  GetRawInputDeviceInfoCommand
Specifies what data will be returned in pData.
pData  IntPtr
A pointer to a buffer that contains the information specified by uiCommand.
refSize  UInt32
The size, in bytes, of the data in pData.

Return Value

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

If pData is not large enough for the data, the function returns -1.

If pData is Zero, the function returns 0.

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

Call GetLastWin32Error to identify any other errors.

Remarks

See Also