INPUT (Structures)
Last changed: -113.208.118.82

.
Summary
TODO - a short description

C# Definition:

[StructLayout(LayoutKind.Explicit)]
struct INPUT {
  [FieldOffset(0)] int type;
  [FieldOffset(4)] MOUSEINPUT mi;
  [FieldOffset(4)] KEYBDINPUT ki;
  [FieldOffset(4)] HARDWAREINPUT hi;
}

VB Definition:

<StructLayout(LayoutKind.Explicit)> _
Public Structure INPUT
     <FieldOffset(0)> _
     Public [type] As Integer
     ' arrange the next three fields as a union
     <FieldOffset(4)> _
     Public mi As MOUSEINPUT
     <FieldOffset(4)> _
     Public ki As KEYBDINPUT
     <FieldOffset(4)> _
     Public hi As HARDWAREINPUT
End Structure

User-Defined Field Types:

MOUSEINPUT, KEYBDINPUT, HARDWAREINPUT

Notes:

The last 3 fields are a union, which is why they are all at the same memory offset.

Documentation
INPUT on MSDN