GetRawInputDeviceInfo function

Retrieves information about the raw input device.

Syntax


UINT WINAPI GetRawInputDeviceInfo(
  _In_opt_     HANDLE hDevice,
  _In_         UINT uiCommand,
  _Inout_opt_  LPVOID pData,
  _Inout_      PUINT pcbSize
);

Parameters

hDevice [in, optional]

Type: HANDLE

A handle to the raw input device. This comes from the lParam of the WM_INPUT message, from the hDevice member of RAWINPUTHEADER, or from GetRawInputDeviceList. It can also be NULL if an application inserts input data, for example, by using SendInput.

uiCommand [in]

Type: UINT

Specifies what data will be returned in pData. This parameter can be one of the following values.

ValueMeaning
RIDI_DEVICENAME
0x20000007

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
0x2000000b

pData points to an RID_DEVICE_INFO structure.

RIDI_PREPARSEDDATA
0x20000005

pData points to the previously parsed data.

 

pData [in, out, optional]

Type: LPVOID

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.

pcbSize [in, out]

Type: PUINT

The size, in bytes, of the data in pData.

Return value

Type: UINT

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.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

Unicode and ANSI names

GetRawInputDeviceInfoW (Unicode) and GetRawInputDeviceInfoA (ANSI)

See also

Reference
RAWINPUTHEADER
RID_DEVICE_INFO
WM_INPUT
Conceptual
Raw Input

 

 

Community Additions

ADD
Show:
© 2014 Microsoft