Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than Structures, prefix the name with the module name and a period.
INPUT (Structures)
.
C# Definition:
[StructLayout(LayoutKind.Sequential)]
public struct INPUT
{
internal InputType type;
internal InputUnion U;
internal static int Size
{
get { return Marshal.SizeOf(typeof(INPUT)); }
}
}
public enum InputType : uint
{
INPUT_MOUSE,
INPUT_KEYBOARD,
INPUT_HARDWARE
}
<StructLayout(LayoutKind.Explicit)> _
Structure InputUnion
<FieldOffset(0)> Public mi As MOUSEINPUT
<FieldOffset(0)> Public ki As KEYBDINPUT
<FieldOffset(0)> Public hi As HARDWAREINPUT
End Structure
Structure INPUT
Public type As Integer
Public u As InputUnion
End Structure
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 is 8, because the nested struct uses the alignment of its biggest member, which is 8 (due to the 64-bit pointer in dwExtraInfo). By separating the union into its own structure, rather than placing the mi, ki and hi fields directly in the INPUT structure, we assure that the .Net structure will have the correct alignment on both 32 and 64 bit.
"internal static int Size" does not work. it should be:
"internal int Size" <-- Not quite correct: Size is not part of the structure itself. It is a static helper property to get the size of INPUT in bytes. See SendInput. The definition above works well.
TODO - a short description
1/3/2014 5:10:17 AM - -77.125.97.109
The [KEYBDINPUT] structure contains information about a simulated keyboard event. It's part of the [INPUT] structure, and is used for the SendInput function.
4/10/2012 6:38:31 PM - -77.125.97.109
TODO - a short description
4/10/2012 6:37:57 PM - -157.82.157.63
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.