RAWINPUTHEADER structure (Windows)

Switch View :
ScriptFree
RAWINPUTHEADER structure

Applies to: desktop apps only

Contains the header information that is part of the raw input data.

Syntax

typedef struct tagRAWINPUTHEADER {
  DWORD  dwType;
  DWORD  dwSize;
  HANDLE hDevice;
  WPARAM wParam;
} RAWINPUTHEADER, *PRAWINPUTHEADER;

Members

dwType

Type: DWORD

The type of raw input. It can be one of the following values.

ValueMeaning
RIM_TYPEHID
2

Raw input comes from some device that is not a keyboard or a mouse.

RIM_TYPEKEYBOARD
1

Raw input comes from the keyboard.

RIM_TYPEMOUSE
0

Raw input comes from the mouse.

 

dwSize

Type: DWORD

The size, in bytes, of the entire input packet of data. This includes RAWINPUT plus possible extra input reports in the RAWHID variable length array.

hDevice

Type: HANDLE

A handle to the device generating the raw input data.

wParam

Type: WPARAM

The value passed in the wParam parameter of the WM_INPUT message.

Remarks

To get more information on the device, use hDevice in a call to GetRawInputDeviceInfo.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Winuser.h (include Windows.h)

See also

Reference
GetRawInputDeviceInfo
RAWHID
RAWINPUT
WM_INPUT
Conceptual
Raw Input

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Content

The Thinker
anyone know how to send multiple mouse messages?
Anyone learned how to get multipoint or mousemischief to work with rawinput by simulating a certain amount of devices being plugged up or having rawinput sent to an emulated device? Right now i wish to implement multiple mice into my kinect project but need to know the correct input report or how to use raw input with multiple mice. kinect project page: http://kinectmultipoint.codeplex.com

Đonny
Visual Basic 9 Declaration
        <StructLayout(LayoutKind.Sequential, Size:=RAWINPUTHEADER.Size)> _
Public Structure RAWINPUTHEADER
Public dwType As DeviceTypes
Public dwSize As Integer
Public hDevice As IntPtr
Public wParam As Int32
Public Const Size% = 16
End Structure

  PublicEnum DeviceTypes AsUInteger

RIM_TYPEHID = 2

RIM_TYPEKEYBOARD = 1

RIM_TYPEMOUSE = 0

EndEnum