Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
User Input
Raw Input
Raw Input Reference
Functions
 RegisterRawInputDevices Function
RegisterRawInputDevices Function

The RegisterRawInputDevices function registers the devices that supply the raw input data.

Syntax

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

Parameters

pRawInputDevices
[in] Pointer to an array of RAWINPUTDEVICE structures that represent the devices that supply the raw input.
uiNumDevices
[in] Number of RAWINPUTDEVICE structures pointed to by pRawInputDevices.
cbSize
[in] Size, in bytes, of a RAWINPUTDEVICE structure.

Return Value

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.

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

Function Information

Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systems Windows XP

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Visual Basic 9 Declaration      Đonny   |   Edit   |   Show History
Public Declare Auto Function RegisterRawInputDevices Lib "User32.dll" (ByVal pRawInputDevice As RAWINPUTDEVICE(), ByVal uiNumDevices As UInteger, ByVal cbSize As UInteger) As Boolean
C# Declaration      ChGu   |   Edit   |   Show History
[DllImport("user32.dll")]
extern bool RegisterRawInputDevices(RAWINPUTDEVICE[] pRawInputDevices,
uint uiNumDevices,
uint cbSize);
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker