GetRawInputDeviceInfoW function (winuser.h)
Retrieves information about the raw input device.
UINT GetRawInputDeviceInfoW( [in, optional] HANDLE hDevice, [in] UINT uiCommand, [in, out, optional] LPVOID pData, [in, out] PUINT pcbSize );
[in, optional] hDevice
A handle to the raw input device. This comes from the hDevice member of RAWINPUTHEADER or from GetRawInputDeviceList.
Specifies what data will be returned in pData. This parameter can be one of the following values.
||pData is a PHIDP_PREPARSED_DATA pointer to a buffer for a top-level collection's preparsed data.|
pData points to a string that contains the device interface name.
If this device is opened with Shared Access Mode then you can call CreateFile with this name to open a HID collection and use returned handle for calling ReadFile to read input reports and WriteFile to send output reports.
For more information, see Opening HID Collections and Handling HID Reports.
For this uiCommand only, the value in pcbSize is the character count (not the byte count).
||pData points to an RID_DEVICE_INFO structure.|
[in, out, optional] pData
A pointer to a buffer that contains the information specified by uiCommand.
If uiCommand is RIDI_DEVICEINFO, set the cbSize member of RID_DEVICE_INFO to
sizeof(RID_DEVICE_INFO) before calling GetRawInputDeviceInfo.
[in, out] pcbSize
The size, in bytes, of the data in pData.
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.
The winuser.h header defines GetRawInputDeviceInfo as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||winuser.h (include Windows.h)|
|API set||ext-ms-win-ntuser-rawinput-l1-1-0 (introduced in Windows 10, version 10.0.14393)|