[StructLayout(LayoutKind.Explicit)]
struct INPUT {
[FieldOffset(0)] public int type;
[FieldOffset(4)] public MOUSEINPUT mi;
[FieldOffset(4)] public KEYBDINPUT ki;
[FieldOffset(4)] public HARDWAREINPUT hi;
}
Structure INPUT
Public TODO
End Structure
MOUSEINPUT, KEYBDINPUT, HARDWAREINPUT
The last 3 fields are a union, which is why they are all at the same memory offset.