The GetRawInputDeviceInfo function gets information about the raw input device.
Syntax
UINT GetRawInputDeviceInfo(
HANDLE hDevice,
UINT uiCommand,
LPVOID pData,
PUINT pcbSize
);
Parameters
- hDevice
-
[in] Handle to the raw input device. This comes from the
lParam of the WM_INPUT message, from RAWINPUTHEADER.hDevice, or from GetRawInputDeviceList. It can also be NULL if an application inserts input data, for example, by using SendInput.
- uiCommand
-
[in] Specifies what data will be returned in
pData. It can be one of the following values.
RIDI_PREPARSEDDATA- pData points to the previously parsed data.
RIDI_DEVICENAME- pData points to a string that contains the device name.
For this
uiCommand only, the value in
pcbSize is the character count (not the byte count).
RIDI_DEVICEINFO- pData points to an RID_DEVICE_INFO structure.
- pData
-
[in, out] Pointer to a buffer that contains the information specified by
uiCommand. If
uiCommand is RIDI_DEVICEINFO, set RID_DEVICE_INFO.cbSize to sizeof(RID_DEVICE_INFO) before calling GetRawInputDeviceInfo.
- pcbSize
-
[in, out] Pointer to a variable that contains the size, in bytes, of the data in
pData.
Return Value
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 NULL, the function returns a value of zero. In both of these cases,
pcbSize is set to the minimum size required for the
pData buffer.
Call GetLastError to identify any other errors.
Function Information
| Minimum DLL Version | user32.dll |
|---|
| Header | Declared in Winuser.h, include Windows.h |
|---|
| Import library | User32.lib |
|---|
| Minimum operating systems |
Windows XP |
|---|
| Unicode | Implemented as
ANSI and Unicode versions. |
|---|
See Also