- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
using System;
using Nemerle.Collections;
using Nemerle.Text;
using Nemerle.Utility;
using System.Runtime.InteropServices;
namespace nCdy
{
/// <summary>
/// Description of Win32API.
/// </summary>
public static class Win32API
{
[ Flags ]
public enum AllocationType
{
| Commit = 0x1000
}
[ Flags ]
public enum ProcessAccess : int
{
| VMOperation = 0x8
| VMRead = 0x10
| VMWrite = 0x20
}
[ Flags ]
public enum MemoryProtection
{
| ReadWrite = 0x04
}
//[StructLayout(LayoutKind.Sequential)]
public struct LUID {
internal LowPart : uint;
internal HighPart : uint;
}
//[StructLayout(LayoutKind.Sequential)]
public struct TOKEN_PRIVILEGES
{
public PrivilegeCount : UInt32;
public Luid : LUID;
public Attributes : UInt32;
}
public struct MOUSEINPUT
{
dx : int;
dy : int;
mouseData : int;
dwFlags : int;
time : int;
dwExtraInfo : IntPtr;
}
public struct KEYBDINPUT
{
public mutable wVk : char ;
public wScan : short ;
public dwFlags : int ;
public time : int ;
public dwExtraInfo : IntPtr ;
}
public struct HARDWAREINPUT
{
uMsg : int ;
wParamL : short ;
wParamH : short ;
}
[StructLayout(LayoutKind.Explicit)]
public struct INPUT
{
[FieldOffset(0)]
public mutable typefield : int ;
[FieldOffset(4)]
mi : MOUSEINPUT;
[FieldOffset(4)]
public mutable ki : KEYBDINPUT;
[FieldOffset(4)]
hi : HARDWAREINPUT;
}
[DllImport("user32.dll")]
public static extern keybd_event(
bVk : byte,
bScan : byte,
dwFlags : uint,
dwExtraInfo : UIntPtr) : void ;
[DllImport("user32.dll")]
З.Ы. В чем говнокод?