Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

INPUT (Structures)
 
.
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:

    Structure INPUT_TYPE
        <FieldOffset(0)> Dim dwType As Integer
        <FieldOffset(4)> Dim mi As MOUSEINPUT
        <FieldOffset(4)> Dim ki As KEYBDINPUT
        <FieldOffset(4)> Dim 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.

On 64-Bit systems, the offset of the mi, ki and hi fields may need to be 8, due to alignment. It might therefore be more convenient, to define three structs and let the compiler do the actual layout.

Documentation
INPUT on MSDN

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Find References
Show Printable Version
Revisions