Export (0) Print
Expand All
2 out of 3 rated this helpful - Rate this topic

RAWINPUT structure

Contains the raw input from a device.

Syntax


typedef struct tagRAWINPUT {
  RAWINPUTHEADER header;
  union {
    RAWMOUSE    mouse;
    RAWKEYBOARD keyboard;
    RAWHID      hid;
  } data;
} RAWINPUT, *PRAWINPUT, *LPRAWINPUT;

Members

header

Type: RAWINPUTHEADER

The raw input data.

data
mouse

Type: RAWMOUSE

If the data comes from a mouse, this is the raw input data.

keyboard

Type: RAWKEYBOARD

If the data comes from a keyboard, this is the raw input data.

hid

Type: RAWHID

If the data comes from an HID, this is the raw input data.

Remarks

The handle to this structure is passed in the lParam parameter of WM_INPUT.

To get detailed information -- such as the header and the content of the raw input -- call GetRawInputData.

To read the RAWINPUT in the message loop as a buffered read, call GetRawInputBuffer.

To get device specific information, call GetRawInputDeviceInfo with the hDevice from RAWINPUTHEADER.

Raw input is available only when the application calls RegisterRawInputDevices with valid device specifications.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winuser.h (include Windows.h)

See also

Reference
GetRawInputBuffer
GetRawInputData
RAWHID
RAWINPUTHEADER
RAWKEYBOARD
RAWMOUSE
Conceptual
Raw Input

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.