- 001
- 002
- 003
- 004
- 005
- 006
- 007
- 008
- 009
- 010
- 011
- 012
- 013
- 014
- 015
- 016
- 017
- 018
- 019
- 020
- 021
- 022
- 023
- 024
- 025
- 026
- 027
- 028
- 029
- 030
- 031
- 032
- 033
- 034
- 035
- 036
- 037
- 038
- 039
- 040
- 041
- 042
- 043
- 044
- 045
- 046
- 047
- 048
- 049
- 050
- 051
- 052
- 053
- 054
- 055
- 056
- 057
- 058
- 059
- 060
- 061
- 062
- 063
- 064
- 065
- 066
- 067
- 068
- 069
- 070
- 071
- 072
- 073
- 074
- 075
- 076
- 077
- 078
- 079
- 080
- 081
- 082
- 083
- 084
- 085
- 086
- 087
- 088
- 089
- 090
- 091
- 092
- 093
- 094
- 095
- 096
- 097
- 098
- 099
- 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")]
Nagg 05.02.2010 16:55 # 0
diablo 05.02.2010 17:00 # 0
З.Ы. В чем говнокод?
guest 05.02.2010 21:47 # −2.4
xXx_totalwar 06.02.2010 11:51 # +1.2
guest 09.02.2010 16:05 # −1.2
Nemerle 06.02.2010 22:34 # −3.2
guest 21.02.2010 09:34 # +0.2