Export (0) Print
Expand All

RegisterRawInputDevices function

Registers the devices that supply the raw input data.

Syntax


BOOL WINAPI RegisterRawInputDevices(
  _In_  PCRAWINPUTDEVICE pRawInputDevices,
  _In_  UINT uiNumDevices,
  _In_  UINT cbSize
);

Parameters

pRawInputDevices [in]

Type: PCRAWINPUTDEVICE

An array of RAWINPUTDEVICE structures that represent the devices that supply the raw input.

uiNumDevices [in]

Type: UINT

The number of RAWINPUTDEVICE structures pointed to by pRawInputDevices.

cbSize [in]

Type: UINT

The size, in bytes, of a RAWINPUTDEVICE structure.

Return value

Type: BOOL

TRUE if the function succeeds; otherwise, FALSE. If the function fails, call GetLastError for more information.

Remarks

To receive WM_INPUT messages, an application must first register the raw input devices using RegisterRawInputDevices. By default, an application does not receive raw input.

To receive WM_INPUT_DEVICE_CHANGE messages, an application must specify the RIDEV_DEVNOTIFY flag for each device class that is specified by the usUsagePage and usUsage fields of the RAWINPUTDEVICE structure . By default, an application does not receive WM_INPUT_DEVICE_CHANGE notifications for raw input device arrival and removal.

If a RAWINPUTDEVICE structure has the RIDEV_REMOVE flag set and the hwndTarget parameter is not set to NULL, then parameter validation will fail.

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

See also

Reference
RAWINPUTDEVICE
WM_INPUT
Conceptual
Raw Input

 

 

Community Additions

ADD
Show:
© 2014 Microsoft