45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace NibblePoker.Win32Bindings.WinUser.SendKeys;
|
|
|
|
public class Structures {
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct INPUT {
|
|
public int type;
|
|
public InputUnion U;
|
|
}
|
|
|
|
[StructLayout(LayoutKind.Explicit)]
|
|
public struct InputUnion {
|
|
[FieldOffset(0)] public MOUSEINPUT mi;
|
|
[FieldOffset(0)] public KEYBDINPUT ki;
|
|
[FieldOffset(0)] public HARDWAREINPUT hi;
|
|
}
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct MOUSEINPUT {
|
|
public int dx;
|
|
public int dy;
|
|
public int mouseData;
|
|
public uint dwFlags;
|
|
public uint time;
|
|
public IntPtr dwExtraInfo;
|
|
}
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct KEYBDINPUT {
|
|
public ushort wVk;
|
|
public ushort wScan;
|
|
public uint dwFlags;
|
|
public uint time;
|
|
public IntPtr dwExtraInfo;
|
|
}
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct HARDWAREINPUT {
|
|
public uint uMsg;
|
|
public ushort wParamL;
|
|
public ushort wParamH;
|
|
}
|
|
}
|