User32GetRawInputData Method

Retrieves the raw input from the specified 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")]
public static uint GetRawInputData(
	IntPtr hRawInput,
	GetRawInputDataCommand uiCommand,
	IntPtr pData,
	ref uint refSize,
	uint cbSizeHeader
)

Parameters

hRawInput  IntPtr
A handle to the RawInput structure.

This comes from the lParam in WM_Input.

uiCommand  GetRawInputDataCommand
The command flag.
pData  IntPtr
A pointer to the data that comes from the RawInput structure.

This depends on the value of uiCommand.

If pData is Zero, the required size of the buffer is returned in refSize.

refSize  UInt32
The size, in bytes, of the data in pData.
cbSizeHeader  UInt32
The size, in bytes, of the RawInputHeader structure.

Return Value

UInt32
If pData is Zero and the function is successful, the return value is 0.

If pData is not Zero and the function is successful, the return value is the number of bytes copied into pData.

If there is an error, the return value is -1.

Remarks

See Also