[StructLayout(LayoutKind.Explicit)]
struct INPUT {
public [FieldOffset(0)] int type;
public [FieldOffset(4)] MOUSEINPUT mi;
public [FieldOffset(4)] KEYBDINPUT ki;
public [FieldOffset(4)] 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.