GetRawInputData function
Retrieves the raw input from the specified device.
Syntax
UINT WINAPI GetRawInputData( _In_ HRAWINPUT hRawInput, _In_ UINT uiCommand, _Out_opt_ LPVOID pData, _Inout_ PUINT pcbSize, _In_ UINT cbSizeHeader );
Parameters
- hRawInput [in]
-
Type: HRAWINPUT
A handle to the RAWINPUT structure. This comes from the lParam in WM_INPUT.
- uiCommand [in]
-
Type: UINT
The command flag. This parameter can be one of the following values.
Value Meaning - RID_HEADER
- 0x10000005
Get the header information from the RAWINPUT structure.
- RID_INPUT
- 0x10000003
Get the raw data from the RAWINPUT structure.
- pData [out, optional]
-
Type: LPVOID
A pointer to the data that comes from the RAWINPUT structure. This depends on the value of uiCommand. If pData is NULL, the required size of the buffer is returned in *pcbSize.
- pcbSize [in, out]
-
Type: PUINT
The size, in bytes, of the data in pData.
- cbSizeHeader [in]
-
Type: UINT
The size, in bytes, of the RAWINPUTHEADER structure.
Return value
Type: UINT
If pData is NULL and the function is successful, the return value is 0. If pData is not NULL 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 (UINT)-1.
Remarks
GetRawInputData gets the raw input one RAWINPUT structure at a time. In contrast, GetRawInputBuffer gets an array of RAWINPUT structures.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- Reference
- GetRawInputBuffer
- RAWINPUT
- RAWINPUTHEADER
- Conceptual
- Raw Input