热点推荐

查看: 642|回复: 9
收起左侧

[资料] C#封装好的Win32API

[复制链接]
  • TA的每日心情
    奋斗
    2018-11-2 10:21
  • 签到天数: 21 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    10

    主题

    27

    帖子

    227

    积分

    Rank: 7Rank: 7Rank: 7

    积分
    227

    优质会员

    发表于 2018-4-27 16:53:02 | 显示全部楼层 |阅读模式

    51Halcon诚邀您的加入,专注于机器视觉开发与应用技术,我们一直都在努力!

    您需要 登录 才可以下载或查看,没有帐号?会员注册

    x
    Kernel.cs
    1. using System;
    2. using System.Runtime.InteropServices;
    3. using System.Text;

    4. using HANDLE = System.IntPtr;
    5. using HWND = System.IntPtr;

    6. namespace Win32
    7. {
    8.     public struct OVERLAPPED
    9.     {
    10.         public int Internal;
    11.         public int InternalHigh;
    12.         public int offset;
    13.         public int OffsetHigh;
    14.         public HANDLE hEvent;
    15.     }
    16.     public struct SECURITY_ATTRIBUTES
    17.     {
    18.         public int nLength;
    19.         public int lpSecurityDescriptor;
    20.         public int bInheritHandle;
    21.     }
    22.     public struct PROCESS_INFORMATION
    23.     {
    24.         public HANDLE hProcess;
    25.         public HANDLE hThread;
    26.         public int dwProcessId;
    27.         public int dwThreadId;
    28.     }
    29.     public struct COMMPROP
    30.     {
    31.         public short wPacketLength;
    32.         public short wPacketVersion;
    33.         public int dwServiceMask;
    34.         public int dwReserved1;
    35.         public int dwMaxTxQueue;
    36.         public int dwMaxRxQueue;
    37.         public int dwMaxBaud;
    38.         public int dwProvSubType;
    39.         public int dwProvCapabilities;
    40.         public int dwSettableParams;
    41.         public int dwSettableBaud;
    42.         public short wSettableData;
    43.         public short wSettableStopParity;
    44.         public int dwCurrentTxQueue;
    45.         public int dwCurrentRxQueue;
    46.         public int dwProvSpec1;
    47.         public int dwProvSpec2;
    48.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public short[] wcProvChar;
    49.     }
    50.     public struct COMSTAT
    51.     {
    52.         public int fBitFields;
    53.         public int cbInQue;
    54.         public int cbOutQue;
    55.     }
    56.     public struct DCB
    57.     {
    58.         public int DCBlength;
    59.         public int BaudRate;
    60.         public int fBitFields;
    61.         public short wReserved;
    62.         public short XonLim;
    63.         public short XoffLim;
    64.         public byte ByteSize;
    65.         public byte Parity;
    66.         public byte StopBits;
    67.         public byte XonChar;
    68.         public byte XoffChar;
    69.         public byte ErrorChar;
    70.         public byte EofChar;
    71.         public byte EvtChar;
    72.         public short wReserved1;
    73.     }
    74.     public struct COMMTIMEOUTS
    75.     {
    76.         public int ReadIntervalTimeout;
    77.         public int ReadTotalTimeoutMultiplier;
    78.         public int ReadTotalTimeoutConstant;
    79.         public int WriteTotalTimeoutMultiplier;
    80.         public int WriteTotalTimeoutConstant;
    81.     }
    82.     public struct SYSTEM_INFO
    83.     {
    84.         public int dwOemID;
    85.         public int dwPageSize;
    86.         public int lpMinimumApplicationAddress;
    87.         public int lpMaximumApplicationAddress;
    88.         public int dwActiveProcessorMask;
    89.         public int dwNumberOrfProcessors;
    90.         public int dwProcessorType;
    91.         public int dwAllocationGranularity;
    92.         public int dwReserved;
    93.     }
    94.     #region Global Memory Flags
    95.     #endregion
    96.     public struct MEMORYSTATUS
    97.     {
    98.         public int dwLength;
    99.         public int dwMemoryLoad;
    100.         public int dwTotalPhys;
    101.         public int dwAvailPhys;
    102.         public int dwTotalPageFile;
    103.         public int dwAvailPageFile;
    104.         public int dwTotalVirtual;
    105.         public int dwAvailVirtual;
    106.     }
    107.     public struct GENERIC_MAPPING
    108.     {
    109.         public int GenericRead;
    110.         public int GenericWrite;
    111.         public int GenericExecute;
    112.         public int GenericAll;
    113.     }
    114.     public struct LUID
    115.     {
    116.         public int LowPart;
    117.         public int HighPart;
    118.     }
    119.     public struct LUID_AND_ATTRIBUTES
    120.     {
    121.         public LUID pLuid;
    122.         public int Attributes;
    123.     }
    124.     public struct ACL
    125.     {
    126.         public byte AclRevision;
    127.         public byte Sbz1;
    128.         public short AclSize;
    129.         public short AceCount;
    130.         public short Sbz2;
    131.     }
    132.     public struct ACE_HEADER
    133.     {
    134.         public byte AceType;
    135.         public byte AceFlags;
    136.         public int AceSize;
    137.     }
    138.     public struct ACCESS_ALLOWED_ACE
    139.     {
    140.         public ACE_HEADER Header;
    141.         public int Mask;
    142.         public int SidStart;
    143.     }
    144.     public struct ACCESS_DENIED_ACE
    145.     {
    146.         public ACE_HEADER Header;
    147.         public int Mask;
    148.         public int SidStart;
    149.     }
    150.     public struct SYSTEM_AUDIT_ACE
    151.     {
    152.         public ACE_HEADER Header;
    153.         public int Mask;
    154.         public int SidStart;
    155.     }
    156.     public struct SYSTEM_ALARM_ACE
    157.     {
    158.         public ACE_HEADER Header;
    159.         public int Mask;
    160.         public int SidStart;
    161.     }
    162.     public struct ACL_REVISION_INFORMATION
    163.     {
    164.         public int AclRevision;
    165.     }
    166.     public struct ACL_SIZE_INFORMATION
    167.     {
    168.         public int AceCount;
    169.         public int AclBytesInUse;
    170.         public int AclBytesFree;
    171.     }
    172.     public struct SECURITY_DESCRIPTOR
    173.     {
    174.         public byte Revision;
    175.         public byte Sbz1;
    176.         public int Control;
    177.         public int Owner;
    178.         public int Group;
    179.         public ACL Sacl;
    180.         public ACL Dacl;
    181.     }
    182.     public struct PRIVILEGE_SET
    183.     {
    184.         public int PrivilegeCount;
    185.         public int Control;
    186.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public LUID_AND_ATTRIBUTES[] Privilege;
    187.     }
    188.     public struct EXCEPTION_RECORD
    189.     {
    190.         public int ExceptionCode;
    191.         public int ExceptionFlags;
    192.         public int pExceptionRecord;   
    193.         public int ExceptionAddress;
    194.         public int NumberParameters;
    195.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=15)] public int [] ExceptionInformation;
    196.     }
    197.     public struct EXCEPTION_DEBUG_INFO
    198.     {
    199.         public EXCEPTION_RECORD pExceptionRecord;
    200.         public int dwFirstChance;
    201.     }
    202.     public struct CREATE_THREAD_DEBUG_INFO
    203.     {
    204.         public HANDLE hThread;
    205.         public int lpThreadLocalBase;
    206.         public int lpStartAddress;
    207.     }
    208.     public struct CREATE_PROCESS_DEBUG_INFO
    209.     {
    210.         public HANDLE hFile;
    211.         public HANDLE hProcess;
    212.         public HANDLE hThread;
    213.         public int lpBaseOfImage;
    214.         public int dwDebugInfoFileOffset;
    215.         public int nDebugInfoSize;
    216.         public int lpThreadLocalBase;
    217.         public int lpStartAddress;
    218.         public int lpImageName;
    219.         public short fUnicode;
    220.     }
    221.     public struct EXIT_THREAD_DEBUG_INFO
    222.     {
    223.         public int dwExitCode;
    224.     }
    225.     public struct EXIT_PROCESS_DEBUG_INFO
    226.     {
    227.         public int dwExitCode;
    228.     }
    229.     public struct LOAD_DLL_DEBUG_INFO
    230.     {
    231.         public HANDLE hFile;
    232.         public int lpBaseOfDll;
    233.         public int dwDebugInfoFileOffset;
    234.         public int nDebugInfoSize;
    235.         public int lpImageName;
    236.         public short fUnicode;
    237.     }
    238.     public struct UNLOAD_DLL_DEBUG_INFO
    239.     {
    240.         public int lpBaseOfDll;
    241.     }
    242.     public struct OUTPUT_DEBUG_STRING_INFO
    243.     {
    244.         public string lpDebugStringData;
    245.         public short fUnicode;
    246.         public short nDebugStringLength;
    247.     }
    248.     public struct RIP_INFO
    249.     {
    250.         public int dwError;
    251.         public int dwType;
    252.     }
    253.     public struct OFSTRUCT
    254.     {
    255.         public byte cBytes;
    256.         public byte fFixedDisk;
    257.         public short nErrCode;
    258.         public short Reserved1;
    259.         public short Reserved2;
    260.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=128)] public byte[] szPathName;
    261.     }
    262.     public struct CRITICAL_SECTION
    263.     {
    264.         public int pDebugInfo;
    265.         public int LockCount;
    266.         public int RecursionCount;
    267.         public int pOwningThread;
    268.         public int pLockSemaphore;
    269.         public int Reserved;
    270.     }
    271.     public struct BY_HANDLE_FILE_INFORMATION
    272.     {
    273.         public int dwFileAttributes;
    274.         public FILETIME ftCreationTime;
    275.         public FILETIME ftLastAccessTime;
    276.         public FILETIME ftLastWriteTime;
    277.         public int dwVolumeSerialNumber;
    278.         public int nFileSizeHigh;
    279.         public int nFileSizeLow;
    280.         public int nNumberOfLinks;
    281.         public int nFileIndexHigh;
    282.         public int nFileIndexLow;
    283.     }
    284.     public struct MEMORY_BASIC_INFORMATION
    285.     {
    286.         public int BaseAddress;
    287.         public int AllocationBase;
    288.         public int AllocationProtect;
    289.         public int RegionSize;
    290.         public int State;
    291.         public int Protect;
    292.         public int lType;
    293.     }
    294.     public struct EVENTLOGRECORD
    295.     {
    296.         public int Length;
    297.         public int Reserved;
    298.         public int RecordNumber;
    299.         public int TimeGenerated;
    300.         public int TimeWritten;
    301.         public int EventID;
    302.         public short EventType;
    303.         public short NumStrings;
    304.         public short EventCategory;
    305.         public short ReservedFlags;
    306.         public int ClosingRecordNumber;
    307.         public int StringOffset;
    308.         public int UserSidLength;
    309.         public int UserSidOffset;
    310.         public int DataLength;
    311.         public int DataOffset;
    312.     }
    313.     public struct TOKEN_GROUPS
    314.     {
    315.         public int GroupCount;
    316.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)]     public SID_AND_ATTRIBUTES[] Groups;
    317.     }
    318.     public struct TOKEN_PRIVILEGES
    319.     {
    320.         public int PrivilegeCount;
    321.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public LUID_AND_ATTRIBUTES[] Privileges;
    322.     }
    323.     public struct CONTEXT
    324.     {
    325.         public double FltF0;
    326.         public double FltF1;
    327.         public double FltF2;
    328.         public double FltF3;
    329.         public double FltF4;
    330.         public double FltF5;
    331.         public double FltF6;
    332.         public double FltF7;
    333.         public double FltF8;
    334.         public double FltF9;
    335.         public double FltF10;
    336.         public double FltF11;
    337.         public double FltF12;
    338.         public double FltF13;
    339.         public double FltF14;
    340.         public double FltF15;
    341.         public double FltF16;
    342.         public double FltF17;
    343.         public double FltF18;
    344.         public double FltF19;
    345.         public double FltF20;
    346.         public double FltF21;
    347.         public double FltF22;
    348.         public double FltF23;
    349.         public double FltF24;
    350.         public double FltF25;
    351.         public double FltF26;
    352.         public double FltF27;
    353.         public double FltF28;
    354.         public double FltF29;
    355.         public double FltF30;
    356.         public double FltF31;
    357.         public double IntV0;
    358.         public double IntT0;
    359.         public double IntT1;
    360.         public double IntT2;
    361.         public double IntT3;
    362.         public double IntT4;
    363.         public double IntT5;
    364.         public double IntT6;
    365.         public double IntT7;
    366.         public double IntS0;
    367.         public double IntS1;
    368.         public double IntS2;
    369.         public double IntS3;
    370.         public double IntS4;
    371.         public double IntS5;
    372.         public double IntFp;
    373.         public double IntA0;
    374.         public double IntA1;
    375.         public double IntA2;
    376.         public double IntA3;
    377.         public double IntA4;
    378.         public double IntA5;
    379.         public double IntT8;
    380.         public double IntT9;
    381.         public double IntT10;
    382.         public double IntT11;
    383.         public double IntRa;
    384.         public double IntT12;
    385.         public double IntAt;
    386.         public double IntGp;
    387.         public double IntSp;
    388.         public double IntZero;
    389.         public double Fpcr;
    390.         public double SoftFpcr;
    391.         public double Fir;
    392.         public int Psr;
    393.         public int ContextFlags;
    394.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)] public int []Fill;
    395.     }
    396.     public struct EXCEPTION_POINTERS
    397.     {
    398.         public EXCEPTION_RECORD pExceptionRecord;
    399.         public CONTEXT ContextRecord;
    400.     }
    401.     public struct LDT_BYTES   
    402.     {
    403.         public byte BaseMid;
    404.         public byte Flags1;
    405.         public byte Flags2;
    406.         public byte BaseHi;
    407.     }
    408.     public struct LDT_ENTRY
    409.     {
    410.         public short LimitLow;
    411.         public short BaseLow;
    412.         public int HighWord;   
    413.     }
    414.     public struct TIME_ZONE_INFORMATION
    415.     {
    416.         public int Bias;
    417.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=32)] public short[] StandardName;
    418.         public SYSTEMTIME StandardDate;
    419.         public int StandardBias;
    420.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=32)] public short[] DaylightName;
    421.         public SYSTEMTIME DaylightDate;
    422.         public int DaylightBias;
    423.     }
    424.     public struct WIN32_STREAM_ID
    425.     {
    426.         public int dwStreamID;
    427.         public int dwStreamAttributes;
    428.         public int dwStreamSizeLow;
    429.         public int dwStreamSizeHigh;
    430.         public int dwStreamNameSize;
    431.         public byte cStreamName;
    432.     }
    433.     public struct STARTUPINFO
    434.     {
    435.         public int cb;
    436.         public string lpReserved;
    437.         public string lpDesktop;
    438.         public string lpTitle;
    439.         public int dwX;
    440.         public int dwY;
    441.         public int dwXSize;
    442.         public int dwYSize;
    443.         public int dwXCountChars;
    444.         public int dwYCountChars;
    445.         public int dwFillAttribute;
    446.         public int dwFlags;
    447.         public short wShowWindow;
    448.         public short cbReserved2;
    449.         public int lpReserved2;
    450.         public HANDLE hStdInput;
    451.         public HANDLE hStdOutput;
    452.         public HANDLE hStdError;
    453.     }
    454.     public struct CPINFO
    455.     {
    456.         public int MaxCharSize;
    457.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=Kernel.MAX_DEFAULTCHAR)] public byte[] DefaultChar;
    458.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=Kernel.MAX_LEADBYTES)] public byte[] LeadByte;
    459.     }
    460.     public struct NUMBERFMT
    461.     {
    462.         public int NumDigits;
    463.         public int LeadingZero;
    464.         public int Grouping;
    465.         public string lpDecimalSep;
    466.         public string lpThousandSep;
    467.         public int NegativeOrder;
    468.     }
    469.     public struct CURRENCYFMT
    470.     {
    471.         public int NumDigits;
    472.         public int LeadingZero;
    473.         public int Grouping;
    474.         public string lpDecimalSep;
    475.         public string lpThousandSep;
    476.         public int NegativeOrder;
    477.         public int PositiveOrder;
    478.         public string lpCurrencySymbol;
    479.     }
    480.     public struct COORD
    481.     {
    482.         public short x;
    483.         public short y;
    484.     }
    485.     public struct SMALL_RECT
    486.     {
    487.         public short Left;
    488.         public short Top;
    489.         public short Right;
    490.         public short Bottom;
    491.     }
    492.     public struct KEY_EVENT_RECORD
    493.     {
    494.         public int bKeyDown;
    495.         public short wRepeatCount;
    496.         public short wVirtualKeyCode;
    497.         public short wVirtualScanCode;
    498.         public byte uChar;
    499.         public int dwControlKeyState;
    500.     }
    501.     public struct MOUSE_EVENT_RECORD
    502.     {
    503.         public COORD dwMousePosition;
    504.         public int dwButtonState;
    505.         public int dwControlKeyState;
    506.         public int dwEventFlags;
    507.     }
    508.     public struct WINDOW_BUFFER_SIZE_RECORD
    509.     {
    510.         public COORD dwSize;
    511.     }
    512.     public struct MENU_EVENT_RECORD
    513.     {
    514.         public int dwCommandId;
    515.     }
    516.     public struct FOCUS_EVENT_RECORD
    517.     {
    518.         public int bSetFocus;
    519.     }
    520.     public struct CHAR_INFO
    521.     {
    522.         public short Char;
    523.         public short Attributes;
    524.     }
    525.     public struct CONSOLE_SCREEN_BUFFER_INFO
    526.     {
    527.         public COORD dwSize;
    528.         public COORD dwCursorPosition;
    529.         public short wAttributes;
    530.         public SMALL_RECT srWindow;
    531.         public COORD dwMaximumWindowSize;
    532.     }
    533.     public struct CONSOLE_CURSOR_INFO
    534.     {
    535.         public int dwSize;
    536.         public int bVisible;
    537.     }
    538.     public struct SID_IDENTIFIER_AUTHORITY
    539.     {
    540.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=6)] public byte[] Value;
    541.     }
    542.     public struct SID_AND_ATTRIBUTES
    543.     {
    544.         public int Sid;
    545.         public int Attributes;
    546.     }
    547.     public struct WIN32_FIND_DATA
    548.     {
    549.         public int dwFileAttributes;
    550.         public FILETIME ftCreationTime;
    551.         public FILETIME ftLastAccessTime;
    552.         public FILETIME ftLastWriteTime;
    553.         public int nFileSizeHigh;
    554.         public int nFileSizeLow;
    555.         public int dwReserved0;
    556.         public int dwReserved1;
    557.         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=Kernel.MAX_PATH)]
    558.         public string cFileName;
    559.         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=14)]
    560.         public string cAlternate;
    561.     }
    562.     public struct COMMCONFIG
    563.     {
    564.         public int dwSize;
    565.         public short wVersion;
    566.         public short wReserved;
    567.         public DCB dcbx;
    568.         public int dwProviderSubType;
    569.         public int dwProviderOffset;
    570.         public int dwProviderSize;
    571.         public byte wcProviderData;
    572.     }
    573.     public struct SERVICE_STATUS
    574.     {
    575.         public int dwServiceType;
    576.         public int dwCurrentState;
    577.         public int dwControlsAccepted;
    578.         public int dwWin32ExitCode;
    579.         public int dwServiceSpecificExitCode;
    580.         public int dwCheckPoint;
    581.         public int dwWaitHint;
    582.     }
    583.     public struct ENUM_SERVICE_STATUS
    584.     {
    585.         public string lpServiceName;
    586.         public string lpDisplayName;
    587.         public SERVICE_STATUS ServiceStatus;
    588.     }
    589.     public struct QUERY_SERVICE_LOCK_STATUS
    590.     {
    591.         public int fIsLocked;
    592.         public string lpLockOwner;
    593.         public int dwLockDuration;
    594.     }
    595.     public struct QUERY_SERVICE_CONFIG
    596.     {
    597.         public int dwServiceType;
    598.         public int dwStartType;
    599.         public int dwErrorControl;
    600.         public string lpBinaryPathName;
    601.         public string lpLoadOrderGroup;
    602.         public int dwTagId;
    603.         public string lpDependencies;
    604.         public string lpServiceStartName;
    605.         public string lpDisplayName;
    606.     }
    607.     public struct SERVICE_TABLE_ENTRY
    608.     {
    609.         public string lpServiceName;
    610.         public int lpServiceProc;
    611.     }
    612.     public struct LARGE_INTEGER
    613.     {
    614.         public int lowpart;
    615.         public int highpart;
    616.     }
    617.     public struct PERF_DATA_BLOCK
    618.     {
    619.         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=4)] public string Signature;
    620.         public int LittleEndian;
    621.         public int Version;
    622.         public int Revision;
    623.         public int TotalByteLength;
    624.         public int HeaderLength;
    625.         public int NumObjectTypes;
    626.         public int DefaultObject;
    627.         public SYSTEMTIME SystemTime;
    628.         public LARGE_INTEGER PerfTime;
    629.         public LARGE_INTEGER PerfFreq;
    630.         public LARGE_INTEGER PerTime100nSec;
    631.         public int SystemNameLength;
    632.         public int SystemNameOffset;
    633.     }
    634.     public struct PERF_OBJECT_TYPE
    635.     {
    636.         public int TotalByteLength;
    637.         public int DefinitionLength;
    638.         public int HeaderLength;
    639.         public int ObjectNameTitleIndex;
    640.         public string ObjectNameTitle;
    641.         public int ObjectHelpTitleIndex;
    642.         public string ObjectHelpTitle;
    643.         public int DetailLevel;
    644.         public int NumCounters;
    645.         public int DefaultCounter;
    646.         public int NumInstances;
    647.         public int CodePage;
    648.         public LARGE_INTEGER PerfTime;
    649.         public LARGE_INTEGER PerfFreq;
    650.     }
    651.     public struct PERF_COUNTER_DEFINITION
    652.     {
    653.         public int ByteLength;
    654.         public int CounterNameTitleIndex;
    655.         public string CounterNameTitle;
    656.         public int CounterHelpTitleIndex;
    657.         public string CounterHelpTitle;
    658.         public int DefaultScale;
    659.         public int DetailLevel;
    660.         public int CounterType;
    661.         public int CounterSize;
    662.         public int CounterOffset;
    663.     }
    664.     public struct PERF_INSTANCE_DEFINITION
    665.     {
    666.         public int ByteLength;
    667.         public int ParentObjectTitleIndex;
    668.         public int ParentObjectInstance;
    669.         public int UniqueID;
    670.         public int NameOffset;
    671.         public int NameLength;
    672.     }
    673.     public struct PERF_COUNTER_BLOCK
    674.     {
    675.         public int ByteLength;
    676.     }
    677.     public struct OSVERSIONINFO
    678.     {
    679.         public int dwOSVersionInfoSize;
    680.         public int dwMajorVersion;
    681.         public int dwMinorVersion;
    682.         public int dwBuildNumber;
    683.         public int dwPlatformId;
    684.         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)] public string szCSDVersion;
    685.     }
    686.     public struct SYSTEM_POWER_STATUS
    687.     {
    688.         public byte ACLineStatus;
    689.         public byte BatteryFlag;
    690.         public byte BatteryLifePercent;
    691.         public byte Reserved1;
    692.         public int BatteryLifeTime;
    693.         public int BatteryFullLifeTime;
    694.     }

    695.     public abstract class AdvApi
    696.     {
    697.         [DllImport("AdvApi32")] public static extern int ImpersonateLoggedOnUser(HANDLE hToken);
    698.         [DllImport("advapi32")] public static extern int IsTextUnicode(IntPtr lpBuffer, int cb, ref int lpi);
    699.         [DllImport("advapi32")] public static extern int LogonUser(string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, ref int phToken);
    700.         [DllImport("advapi32")] public static extern int NotifyChangeEventLog(HANDLE hEventLog, HANDLE hEvent);
    701.         [DllImport("advapi32")] public static extern int SetThreadToken(int Thread, int Token);
    702.         [DllImport("advapi32")] public static extern Byte GetSidSubAuthorityCount(IntPtr pSid);
    703.         [DllImport("advapi32")] public static extern SID_IDENTIFIER_AUTHORITY GetSidIdentifierAuthority(IntPtr pSid);
    704.         [DllImport("advapi32")] public static extern int AbortSystemShutdown(string lpMachineName);
    705.         [DllImport("advapi32")] public static extern int AccessCheck(ref SECURITY_DESCRIPTOR pSecurityDescriptor, int ClientToken, int DesiredAccess, GENERIC_MAPPING GenericMapping, PRIVILEGE_SET PrivilegeSet, int PrivilegeSetLength, int GrantedAccess, int Status);
    706.         [DllImport("advapi32")] public static extern int AccessCheckAndAuditAlarm(string SubsystemName, IntPtr HandleId, string ObjectTypeName, string ObjectName, SECURITY_DESCRIPTOR SecurityDescriptor, int DesiredAccess, GENERIC_MAPPING GenericMapping, int ObjectCreation, int GrantedAccess, int AccessStatus, ref int pfGenerateOnClose);
    707.         [DllImport("advapi32")] public static extern int AddAccessAllowedAce(ref ACL pAcl, int dwAceRevision, int AccessMask, IntPtr pSid);
    708.         [DllImport("advapi32")] public static extern int AddAccessDeniedAce(ref ACL pAcl, int dwAceRevision, int AccessMask, IntPtr pSid);
    709.         [DllImport("advapi32")] public static extern int AddAce(ref ACL pAcl, int dwAceRevision, int dwStartingAceIndex, IntPtr pAceList, int nAceListLength);
    710.         [DllImport("advapi32")] public static extern int AddAuditAccessAce(ref ACL pAcl, int dwAceRevision, int dwAccessMask, IntPtr pSid, int bAuditSuccess, int bAuditFailure);
    711.         [DllImport("advapi32")] public static extern int AdjustTokenGroups(int TokenHandle, int ResetToDefault, TOKEN_GROUPS NewState, int BufferLength, TOKEN_GROUPS PreviousState, int ReturnLength);
    712.         [DllImport("advapi32")] public static extern int AdjustTokenPrivileges(int TokenHandle, int DisableAllPrivileges, TOKEN_PRIVILEGES NewState, int BufferLength, TOKEN_PRIVILEGES PreviousState, int ReturnLength);
    713.         [DllImport("advapi32")] public static extern int AllocateAndInitializeSid(ref SID_IDENTIFIER_AUTHORITY pIdentifierAuthority, Byte nSubAuthorityCount, int nSubAuthority0, int nSubAuthority1, int nSubAuthority2, int nSubAuthority3, int nSubAuthority4, int nSubAuthority5, int nSubAuthority6, int nSubAuthority7, ref int lpPSid);
    714.         [DllImport("advapi32")] public static extern int AllocateLocallyUniqueId(LARGE_INTEGER Luid);
    715.         [DllImport("advapi32")] public static extern int AreAllAccessesGranted(int GrantedAccess, int DesiredAccess);
    716.         [DllImport("advapi32")] public static extern int AreAnyAccessesGranted(int GrantedAccess, int DesiredAccess);
    717.         [DllImport("advapi32")] public static extern int BackupEventLog(HANDLE hEventLog, string lpBackupFileName);
    718.         [DllImport("advapi32")] public static extern int ChangeServiceConfig(HANDLE hService, int dwServiceType, int dwStartType, int dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup, ref int lpdwTagId, string lpDependencies, string lpServiceStartName, string lpPassword, string lpDisplayName);
    719.         [DllImport("advapi32")] public static extern int ClearEventLog(HANDLE hEventLog, string lpBackupFileName);
    720.         [DllImport("advapi32")] public static extern int CloseEventLog(HANDLE hEventLog);
    721.         [DllImport("advapi32")] public static extern int CloseServiceHandle(HANDLE hSCObject);
    722.         [DllImport("advapi32")] public static extern int ControlService(HANDLE hService, int dwControl, ref SERVICE_STATUS lpServiceStatus);
    723.         [DllImport("advapi32")] public static extern int CopySid(int nDestinationSidLength, IntPtr pDestinationSid, IntPtr pSourceSid);
    724.         [DllImport("advapi32")] public static extern int CreatePrivateObjectSecurity(ref SECURITY_DESCRIPTOR ParentDescriptor, SECURITY_DESCRIPTOR CreatorDescriptor, SECURITY_DESCRIPTOR NewDescriptor, int IsDirectoryObject, int Token, GENERIC_MAPPING GenericMapping);
    725.         [DllImport("advapi32")] public static extern int CreateProcessAsUser(HANDLE hToken, string lpApplicationName, string lpCommandLine, ref SECURITY_ATTRIBUTES lpProcessAttributes, ref SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, int dwCreationFlags, string lpEnvironment, string lpCurrentDirectory, ref STARTUPINFO lpStartupInfo, ref PROCESS_INFORMATION lpProcessInformation);
    726.         [DllImport("advapi32")] public static extern int CreateService(HANDLE hSCManager, string lpServiceName, string lpDisplayName, int dwDesiredAccess, int dwServiceType, int dwStartType, int dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup, ref int lpdwTagId, string lpDependencies, string lp, string lpPassword);
    727.         [DllImport("advapi32")] public static extern int DeleteAce(ref ACL pAcl, int dwAceIndex);
    728.         [DllImport("advapi32")] public static extern int DeleteService(HANDLE hService);
    729.         [DllImport("advapi32")] public static extern int DeregisterEventSource(HANDLE hEventLog);
    730.         [DllImport("advapi32")] public static extern int DestroyPrivateObjectSecurity(ref SECURITY_DESCRIPTOR ObjectDescriptor);
    731.         [DllImport("advapi32")] public static extern int DuplicateToken(int ExistingTokenHandle, short ImpersonationLevel, int DuplicateTokenHandle);
    732.         [DllImport("advapi32")] public static extern int EnumDependentServices(HANDLE hService, int dwServiceState, ref ENUM_SERVICE_STATUS lpServices, int cbBufSize, ref int pcbBytesNeeded, ref int lpServicesReturned);
    733.         [DllImport("advapi32")] public static extern int EnumServicesStatus(HANDLE hSCManager, int dwServiceType, int dwServiceState, ref ENUM_SERVICE_STATUS lpServices, int cbBufSize, ref int pcbBytesNeeded, ref int lpServicesReturned, ref int lpResumeHandle);
    734.         [DllImport("advapi32")] public static extern int EqualPrefixSid(IntPtr pSid1, IntPtr pSid2);
    735.         [DllImport("advapi32")] public static extern int EqualSid(IntPtr pSid1, IntPtr pSid2);
    736.         [DllImport("advapi32")] public static extern int FindFirstFreeAce(ref ACL pAcl, ref int pAce);
    737.         [DllImport("advapi32")] public static extern int GetAce(ref ACL pAcl, int dwAceIndex, IntPtr pAce);
    738.         [DllImport("advapi32")] public static extern int GetAclInformation(ref ACL pAcl, IntPtr pAclInformation, int nAclInformationLength, short dwAclInformationClass);
    739.         [DllImport("advapi32")] public static extern int GetFileSecurity(string lpFileName, int RequestedInformation, ref SECURITY_DESCRIPTOR pSecurityDescriptor, int nLength, ref int lpnLengthNeeded);
    740.         [DllImport("advapi32")] public static extern int GetKernelObjectSecurity(HANDLE handle, int RequestedInformation, ref SECURITY_DESCRIPTOR pSecurityDescriptor, int nLength, ref int lpnLengthNeeded);
    741.         [DllImport("advapi32")] public static extern int GetLengthSid(IntPtr pSid);
    742.         [DllImport("advapi32")] public static extern int GetNumberOfEventLogRecords(HANDLE hEventLog, int NumberOfRecords);
    743.         [DllImport("advapi32")] public static extern int GetOldestEventLogRecord(HANDLE hEventLog, int OldestRecord);
    744.         [DllImport("advapi32")] public static extern int GetPrivateObjectSecurity(ref SECURITY_DESCRIPTOR ObjectDescriptor, int SecurityInformation, SECURITY_DESCRIPTOR ResultantDescriptor, int DescriptorLength, int ReturnLength);
    745.         [DllImport("advapi32")] public static extern int GetSecurityDescriptorControl(ref SECURITY_DESCRIPTOR pSecurityDescriptor, short pControl, ref int lpdwRevision);
    746.         [DllImport("advapi32")] public static extern int GetSecurityDescriptorDacl(ref SECURITY_DESCRIPTOR pSecurityDescriptor, ref int lpbDaclPresent, ref ACL pDacl, ref int lpbDaclDefaulted);
    747.         [DllImport("advapi32")] public static extern int GetSecurityDescriptorGroup(ref SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr pGroup, ref int lpbGroupDefaulted);
    748.         [DllImport("advapi32")] public static extern int GetSecurityDescriptorLength(ref SECURITY_DESCRIPTOR pSecurityDescriptor);
    749.         [DllImport("advapi32")] public static extern int GetSecurityDescriptorOwner(ref SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr pOwner, ref int lpbOwnerDefaulted);
    750.         [DllImport("advapi32")] public static extern int GetSecurityDescriptorSacl(ref SECURITY_DESCRIPTOR pSecurityDescriptor, ref int lpbSaclPresent, ref ACL pSacl, ref int lpbSaclDefaulted);
    751.         [DllImport("advapi32")] public static extern int GetServiceDisplayName(HANDLE hSCManager, string lpServiceName, StringBuilder lpDisplayName, ref int cchBuffer);
    752.         [DllImport("advapi32")] public static extern int GetServiceKeyName(HANDLE hSCManager, string lpDisplayName, StringBuilder lpServiceName, ref int cchBuffer);
    753.         [DllImport("advapi32")] public static extern int GetSidLengthRequired(Byte nSubAuthorityCount);
    754.         [DllImport("advapi32")] public static extern int GetSidSubAuthority(IntPtr pSid, int nSubAuthority);
    755.         [DllImport("advapi32")] public static extern int GetTokenInformation(int TokenHandle, short TokenInformationClass, IntPtr TokenInformation, int TokenInformationLength, int ReturnLength);
    756.         [DllImport("advapi32")] public static extern int GetUserName(StringBuilder lpBuffer, int nSize);
    757.         [DllImport("advapi32")] public static extern int ImpersonateNamedPipeClient(HANDLE hNamedPipe);
    758.         [DllImport("advapi32")] public static extern int ImpersonateSelf(short ImpersonationLevel);
    759.         [DllImport("advapi32")] public static extern int InitializeAcl(ref ACL pAcl, int nAclLength, int dwAclRevision);
    760.         [DllImport("advapi32")] public static extern int InitializeSecurityDescriptor(ref SECURITY_DESCRIPTOR pSecurityDescriptor, int dwRevision);
    761.         [DllImport("advapi32")] public static extern int InitializeSid(IntPtr Sid, ref SID_IDENTIFIER_AUTHORITY pIdentifierAuthority, Byte nSubAuthorityCount);
    762.         [DllImport("advapi32")] public static extern int InitiateSystemShutdown(string lpMachineName, string lpMessage, int dwTimeout, int bForceAppsClosed, int bRebootAfterShutdown);
    763.         [DllImport("advapi32")] public static extern int IsValidAcl(ref ACL pAcl);
    764.         [DllImport("advapi32")] public static extern int IsValidSecurityDescriptor(ref SECURITY_DESCRIPTOR pSecurityDescriptor);
    765.         [DllImport("advapi32")] public static extern int IsValidSid(IntPtr pSid);
    766.         [DllImport("advapi32")] public static extern int LockServiceDatabase(HANDLE hSCManager);
    767.         [DllImport("advapi32")] public static extern int LookupAccountName(string lpSystemName, string lpAccountName, int Sid, int cbSid, string ReferencedDomainName, int cbReferencedDomainName, int peUse);
    768.         [DllImport("advapi32")] public static extern int LookupAccountSid(string lpSystemName, IntPtr Sid, string name, int cbName, string ReferencedDomainName, int cbReferencedDomainName, int peUse);
    769.         [DllImport("advapi32")] public static extern int LookupPrivilegeDisplayName(string lpSystemName, string lpName, string lpDisplayName, int cbDisplayName, ref int lpLanguageID);
    770.         [DllImport("advapi32")] public static extern int LookupPrivilegeName(string lpSystemName, ref LARGE_INTEGER lpLuid, string lpName, int cbName);
    771.         [DllImport("advapi32")] public static extern int LookupPrivilegeValue(string lpSystemName, string lpName, ref LARGE_INTEGER lpLuid);
    772.         [DllImport("advapi32")] public static extern int MakeAbsoluteSD(ref SECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor, ref SECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, ref int lpdwAbsoluteSecurityDescriptorSize, ref ACL pDacl, ref int lpdwDaclSize, ref ACL pSacl, ref int lpdwSaclSize, IntPtr pOwner, ref int lpdwOwnerSize, IntPtr pPrimaryGroup, ref int lpdwPrimaryGroupSize);
    773.         [DllImport("advapi32")] public static extern int MakeSelfRelativeSD(ref SECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, ref SECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor, ref int lpdwBufferLength);
    774.         [DllImport("advapi32")] public static extern int NotifyBootConfigStatus(int BootAcceptable);
    775.         [DllImport("advapi32")] public static extern int ObjectCloseAuditAlarm(string SubsystemName, IntPtr HandleId, int GenerateOnClose);
    776.         [DllImport("advapi32")] public static extern int ObjectPrivilegeAuditAlarm(string SubsystemName, IntPtr HandleId, int ClientToken, int DesiredAccess, PRIVILEGE_SET Privileges, int AccessGranted);
    777.         [DllImport("advapi32")] public static extern int OpenBackupEventLog(string lpUNCServerName, string lpFileName);
    778.         [DllImport("advapi32")] public static extern int OpenEventLog(string lpUNCServerName, string lpSourceName);
    779.         [DllImport("advapi32")] public static extern int OpenSCManager(string lpMachineName, string lpDatabaseName, int dwDesiredAccess);
    780.         [DllImport("advapi32")] public static extern int OpenService(HANDLE hSCManager, string lpServiceName, int dwDesiredAccess);
    781.         [DllImport("advapi32")] public static extern int OpenThreadToken(int ThreadHandle, int DesiredAccess, int OpenAsSelf, int TokenHandle);
    782.         [DllImport("advapi32")] public static extern int PrivilegeCheck(int ClientToken, PRIVILEGE_SET RequiredPrivileges, ref int pfResult);
    783.         [DllImport("advapi32")] public static extern int PrivilegedServiceAuditAlarm(string SubsystemName, string ServiceName, int ClientToken, PRIVILEGE_SET Privileges, int AccessGranted);
    784.         [DllImport("advapi32")] public static extern int QueryServiceConfig(HANDLE hService, ref QUERY_SERVICE_CONFIG lpServiceConfig, int cbBufSize, ref int pcbBytesNeeded);
    785.         [DllImport("advapi32")] public static extern int QueryServiceLockStatus(HANDLE hSCManager, ref QUERY_SERVICE_LOCK_STATUS lpLockStatus, int cbBufSize, ref int pcbBytesNeeded);
    786.         [DllImport("advapi32")] public static extern int QueryServiceObjectSecurity(HANDLE hService, int dwSecurityInformation, IntPtr lpSecurityDescriptor, int cbBufSize, ref int pcbBytesNeeded);
    787.         [DllImport("advapi32")] public static extern int QueryServiceStatus(HANDLE hService, ref SERVICE_STATUS lpServiceStatus);
    788.         [DllImport("advapi32")] public static extern int ReadEventLog(HANDLE hEventLog, int dwReadFlags, int dwRecordOffset, ref EVENTLOGRECORD lpBuffer, int nNumberOfBytesToRead, ref int pnBytesRead, ref int pnMinNumberOfBytesNeeded);
    789.         [DllImport("advapi32")] public static extern int RegCloseKey(HANDLE hKey);
    790.         [DllImport("advapi32")] public static extern int RegConnectRegistry(string lpMachineName, HANDLE hKey, ref int phkResult);
    791.         [DllImport("advapi32")] public static extern int RegCreateKey(HANDLE hKey, string lpSubKey, ref int phkResult);
    792.         [DllImport("advapi32")] public static extern int RegCreateKeyEx(HANDLE hKey, string lpSubKey, int Reserved, string lpClass, int dwOptions, int samDesired, ref SECURITY_ATTRIBUTES lpSecurityAttributes, ref int phkResult, ref int lpdwDisposition);
    793.         [DllImport("advapi32")] public static extern int RegDeleteKey(HANDLE hKey, string lpSubKey);
    794.         [DllImport("advapi32")] public static extern int RegDeleteValue(HANDLE hKey, string lpValueName);
    795.         [DllImport("advapi32")] public static extern int RegEnumKey(HANDLE hKey, int dwIndex, string lpName, int cbName);
    796.         [DllImport("advapi32")] public static extern int RegEnumKeyEx(HANDLE hKey, int dwIndex, string lpName, ref int lpcbName, ref int lpReserved, string lpClass, ref int lpcbClass, ref FILETIME lpftLastWriteTime);
    797.         [DllImport("advapi32")] public static extern int RegEnumValue(HANDLE hKey, int dwIndex, string lpValueName, ref int lpcbValueName, ref int lpReserved, ref int lpType, Byte lpData, ref int lpcbData);
    798.         [DllImport("advapi32")] public static extern int RegFlushKey(HANDLE hKey);
    799.         [DllImport("advapi32")] public static extern int RegGetKeySecurity(HANDLE hKey, int SecurityInformation, ref SECURITY_DESCRIPTOR pSecurityDescriptor, ref int lpcbSecurityDescriptor);
    800.         [DllImport("advapi32")] public static extern int RegLoadKey(HANDLE hKey, string lpSubKey, string lpFile);
    801.         [DllImport("advapi32")] public static extern int RegNotifyChangeKeyValue(HANDLE hKey, int bWatchSubtree, int dwNotifyFilter, HANDLE hEvent, int fAsynchronus);
    802.         [DllImport("advapi32")] public static extern int RegOpenKey(HANDLE hKey, string lpSubKey, ref int phkResult);
    803.         [DllImport("advapi32")] public static extern int RegOpenKeyEx(HANDLE hKey, string lpSubKey, int ulOptions, int samDesired, ref int phkResult);
    804.         [DllImport("advapi32")] public static extern int RegQueryInfoKey(HANDLE hKey, string lpClass, ref int lpcbClass, ref int lpReserved, ref int lpcSubKeys, ref int lpcbMaxSubKeyLen, ref int lpcbMaxClassLen, ref int lpcValues, ref int lpcbMaxValueNameLen, ref int lpcbMaxValueLen, ref int lpcbSecurityDescriptor, ref FILETIME lpftLastWriteTime);
    805.         [DllImport("advapi32")] public static extern int RegQueryValue(HANDLE hKey, string lpSubKey, string lpValue, ref int lpcbValue);
    806.         [DllImport("advapi32")] public static extern int RegQueryValueEx(HANDLE hKey, string lpValueName, ref int lpReserved, ref int lpType, IntPtr lpData, ref int lpcbData);
    807.         [DllImport("advapi32")] public static extern int RegReplaceKey(HANDLE hKey, string lpSubKey, string lpNewFile, string lpOldFile);
    808.         [DllImport("advapi32")] public static extern int RegRestoreKey(HANDLE hKey, string lpFile, int dwFlags);
    809.         [DllImport("advapi32")] public static extern int RegSaveKey(HANDLE hKey, string lpFile, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
    810.         [DllImport("advapi32")] public static extern int RegSetKeySecurity(HANDLE hKey, int SecurityInformation, ref SECURITY_DESCRIPTOR pSecurityDescriptor);
    811.         [DllImport("advapi32")] public static extern int RegSetValue(HANDLE hKey, string lpSubKey, int dwType, string lpData, int cbData);
    812.         [DllImport("advapi32")] public static extern int RegSetValueEx(HANDLE hKey, string lpValueName, int Reserved, int dwType, IntPtr lpData, int cbData);
    813.         [DllImport("advapi32")] public static extern int RegUnLoadKey(HANDLE hKey, string lpSubKey);
    814.         [DllImport("advapi32")] public static extern int RegisterEventSource(string lpUNCServerName, string lpSourceName);
    815.         [DllImport("advapi32")] public static extern int RegisterServiceCtrlHandler(string lpServiceName, ref int lpHandlerProc);
    816.         [DllImport("advapi32")] public static extern int ReportEvent(HANDLE hEventLog, int wType, int wCategory, int dwEventID, IntPtr lpUserSid, int wNumStrings, int dwDataSize, ref int lpStrings, IntPtr lpRawData);
    817.         [DllImport("advapi32")] public static extern int RevertToSelf();
    818.         [DllImport("advapi32")] public static extern int SetAclInformation(ref ACL pAcl, IntPtr pAclInformation, int nAclInformationLength, short dwAclInformationClass);
    819.         [DllImport("advapi32")] public static extern int SetFileSecurity(string lpFileName, int SecurityInformation, ref SECURITY_DESCRIPTOR pSecurityDescriptor);
    820.         [DllImport("advapi32")] public static extern int SetKernelObjectSecurity(HANDLE handle, int SecurityInformation, SECURITY_DESCRIPTOR SecurityDescriptor);
    821.         [DllImport("advapi32")] public static extern int SetPrivateObjectSecurity(int SecurityInformation, SECURITY_DESCRIPTOR ModificationDescriptor, SECURITY_DESCRIPTOR ObjectsSecurityDescriptor, GENERIC_MAPPING GenericMapping, int Token);
    822.         [DllImport("advapi32")] public static extern int SetSecurityDescriptorDacl(ref SECURITY_DESCRIPTOR pSecurityDescriptor, int bDaclPresent, ref ACL pDacl, int bDaclDefaulted);
    823.         [DllImport("advapi32")] public static extern int SetSecurityDescriptorGroup(ref SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr pGroup, int bGroupDefaulted);
    824.         [DllImport("advapi32")] public static extern int SetSecurityDescriptorOwner(ref SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr pOwner, int bOwnerDefaulted);
    825.         [DllImport("advapi32")] public static extern int SetSecurityDescriptorSacl(ref SECURITY_DESCRIPTOR pSecurityDescriptor, int bSaclPresent, ref ACL pSacl, int bSaclDefaulted);
    826.         [DllImport("advapi32")] public static extern int SetServiceObjectSecurity(HANDLE hService, int dwSecurityInformation, IntPtr lpSecurityDescriptor);
    827.         [DllImport("advapi32")] public static extern int SetServiceStatus(HANDLE hServiceStatus, ref SERVICE_STATUS lpServiceStatus);
    828.         [DllImport("advapi32")] public static extern int SetTokenInformation(int TokenHandle, short TokenInformationClass, IntPtr TokenInformation, int TokenInformationLength);
    829.         [DllImport("advapi32")] public static extern int StartService(HANDLE hService, int dwNumServiceArgs, ref int lpServiceArgVectors);
    830.         [DllImport("advapi32")] public static extern int StartServiceCtrlDispatcher(ref SERVICE_TABLE_ENTRY lpServiceStartTable);
    831.         [DllImport("advapi32")] public static extern int UnlockServiceDatabase(IntPtr ScLock);
    832.         [DllImport("advapi32")] public static extern void FreeSid(IntPtr pSid);
    833.         [DllImport("advapi32")] public static extern void MapGenericMask(int AccessMask, GENERIC_MAPPING GenericMapping);
    834.         [DllImport("advapi32")] public static extern int GetUserNameW(Byte lpBuffer, int nSize);
    835.         [DllImport("advapi32")] public static extern int OpenProcessToken(int ProcessHandle, int DesiredAccess, int TokenHandle);
    836.     }

    837.     public abstract class Version
    838.     {
    839.         [DllImport("version")] public static extern int GetFileVersionInfo(string lptstrFilename, int dwHandle, int dwLen, IntPtr lpData);
    840.         [DllImport("version")] public static extern int GetFileVersionInfoSize(string lptstrFilename, ref int lpdwHandle);
    841.         [DllImport("version")] public static extern int VerFindFile(int uFlags, string szFileName, string szWinDir, string szAppDir, string szCurDir, ref int lpuCurDirLen, string szDestDir, ref int lpuDestDirLen);
    842.         [DllImport("version")] public static extern int VerInstallFile(int uFlags, string szSrcFileName, string szDestFileName, string szSrcDir, string szDestDir, string szCurDir, string szTmpFile, ref int lpuTmpFileLen);
    843.         [DllImport("version")] public static extern int VerQueryValue(IntPtr pBlock, string lpSubBlock, ref int lplpBuffer, ref int puLen);
    844.     }

    845.     public abstract class Kernel
    846.     {
    847.         [DllImport("kernel32")] public static extern void OutputDebugString(string lpszOutputString);
    848.         [DllImport("KERNEL32")] public static extern int ConvertDefaultLocale(int Locale);
    849.         [DllImport("KERNEL32")] public static extern int EnumDateFormats(int lpDateFmtEnumProc, int Locale, int dwFlags);
    850.         [DllImport("KERNEL32")] public static extern int EnumSystemCodePages(int lpCodePageEnumProc, int dwFlags);
    851.         [DllImport("KERNEL32")] public static extern int EnumSystemLocales(int lpLocaleEnumProc, int dwFlags);
    852.         [DllImport("KERNEL32")] public static extern int EnumTimeFormats(int lpTimeFmtEnumProc, int Locale, int dwFlags);
    853.         [DllImport("KERNEL32")] public static extern int GetThreadLocale();
    854.         [DllImport("KERNEL32")] public static extern int IsValidLocale(int Locale, int dwFlags);
    855.         [DllImport("KERNEL32")] public static extern void ZeroMemory(IntPtr dest, int numBytes);
    856.         [DllImport("kernel32")] public static extern COORD GetLargestConsoleWindowSize(HANDLE hConsoleOutput);
    857.         [DllImport("kernel32")] public static extern int AllocConsole();
    858.         [DllImport("kernel32")] public static extern int BackupRead(HANDLE hFile, Byte lpBuffer, int nNumberOfBytesToRead, ref int lpNumberOfBytesRead, int bAbort, int bProcessSecurity, IntPtr lpContext);
    859.         [DllImport("kernel32")] public static extern int BackupSeek(HANDLE hFile, int dwLowBytesToSeek, int dwHighBytesToSeek, ref int lpdwLowByteSeeked, ref int lpdwHighByteSeeked, ref int lpContext);
    860.         [DllImport("kernel32")] public static extern int BackupWrite(HANDLE hFile, Byte lpBuffer, int nNumberOfBytesToWrite, ref int lpNumberOfBytesWritten, int bAbort, int bProcessSecurity, ref int lpContext);
    861.         [DllImport("kernel32")] public static extern int Beep(int dwFreq, int dwDuration);
    862.         [DllImport("kernel32")] public static extern int BeginUpdateResource(string pFileName, int bDeleteExistingResources);
    863.         [DllImport("kernel32")] public static extern int BuildCommDCB(string lpDef, ref DCB lpDCB);
    864.         [DllImport("kernel32")] public static extern int BuildCommDCBAndTimeouts(string lpDef, ref DCB lpDCB, ref COMMTIMEOUTS lpCommTimeouts);
    865.         [DllImport("kernel32")] public static extern int CallNamedPipe(string lpNamedPipeName, IntPtr lpInBuffer, int nInBufferSize, IntPtr lpOutBuffer, int nOutBufferSize, ref int lpBytesRead, int nTimeOut);
    866.         [DllImport("kernel32")] public static extern int ClearCommBreak(int nCid);
    867.         [DllImport("kernel32")] public static extern int ClearCommError(HANDLE hFile, ref int lpErrors, ref COMSTAT lpStat);
    868.         [DllImport("kernel32")] public static extern int CloseHandle(HANDLE hObject);
    869.         [DllImport("kernel32")] public static extern int CommConfigDialog(string lpszName, HWND hwnd, ref COMMCONFIG lpCC);
    870.         [DllImport("kernel32")] public static extern int CompareFileTime(ref FILETIME lpFileTime1, ref FILETIME lpFileTime2);
    871.         [DllImport("kernel32")] public static extern int CompareString(int Locale, int dwCmpFlags, string lpString1, int cchCount1, string lpString2, int cchCount2);
    872.         [DllImport("kernel32")] public static extern int ConnectNamedPipe(HANDLE hNamedPipe, ref OVERLAPPED lpOverlapped);
    873.         [DllImport("kernel32")] public static extern int ContinueDebugEvent(int dwProcessId, int dwThreadId, int dwContinueStatus);
    874.         [DllImport("kernel32")] public static extern int CopyFile(string lpExistingFileName, string lpNewFileName, int bFailIfExists);
    875.         [DllImport("kernel32")] public static extern int CreateConsoleScreenBuffer(int dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int dwFlags, IntPtr lpScreenBufferData);
    876.         [DllImport("kernel32")] public static extern int CreateDirectory(string lpPathName, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
    877.         [DllImport("kernel32")] public static extern int CreateDirectoryEx(string lpTemplateDirectory, string lpNewDirectory, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
    878.         [DllImport("kernel32")] public static extern int CreateEvent(ref SECURITY_ATTRIBUTES lpEventAttributes, int bManualReset, int bInitialState, string lpName);
    879.         [DllImport("kernel32")] public static extern int CreateFile(string lpFileName, int dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, HANDLE hTemplateFile);
    880.         [DllImport("kernel32")] public static extern int CreateFileMapping(HANDLE hFile, ref SECURITY_ATTRIBUTES lpFileMappigAttributes, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, string lpName);
    881.         [DllImport("kernel32")] public static extern int CreateIoCompletionPort(int FileHandle, int ExistingCompletionPort, int CompletionKey, int NumberOfConcurrentThreads);
    882.         [DllImport("kernel32")] public static extern int CreateMailslot(string lpName, int nMaxMessageSize, int lReadTimeout, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
    883.         [DllImport("kernel32")] public static extern int CreateMutex(ref SECURITY_ATTRIBUTES lpMutexAttributes, int bInitialOwner, string lpName);
    884.         [DllImport("kernel32")] public static extern int CreateNamedPipe(string lpName, int dwOpenMode, int dwPipeMode, int nMaxInstances, int nOutBufferSize, int nInBufferSize, int nDefaultTimeOut, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
    885.         [DllImport("kernel32")] public static extern int CreatePipe(int phReadPipe, int phWritePipe, ref SECURITY_ATTRIBUTES lpPipeAttributes, int nSize);
    886.         [DllImport("kernel32")] public static extern int CreateProcess(string lpApplicationName, string lpCommandLine, ref SECURITY_ATTRIBUTES lpProcessAttributes, ref SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, int dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDriectory, ref STARTUPINFO lpStartupInfo, ref PROCESS_INFORMATION lpProcessInformation);
    887.         [DllImport("kernel32")] public static extern int CreateRemoteThread(HANDLE hProcess, ref SECURITY_ATTRIBUTES lpThreadAttributes, int dwStackSize, ref int lpStartAddress, IntPtr lpParameter, int dwCreationFlags, ref int lpThreadId);
    888.         [DllImport("kernel32")] public static extern int CreateSemaphore(ref SECURITY_ATTRIBUTES lpSemaphoreAttributes, int lInitialCount, int lMaximumCount, string lpName);
    889.         [DllImport("kernel32")] public static extern int CreateTapePartition(HANDLE hDevice, int dwPartitionMethod, int dwCount, int dwSize);
    890.         [DllImport("kernel32")] public static extern int CreateThread(ref SECURITY_ATTRIBUTES lpThreadAttributes, int dwStackSize, ref int lpStartAddress, IntPtr lpParameter, int dwCreationFlags, ref int lpThreadId);
    891.         [DllImport("kernel32")] public static extern int DebugActiveProcess(int dwProcessId);
    892.         [DllImport("kernel32")] public static extern int DefineDosDevice(int dwFlags, string lpDeviceName, string lpTargetPath);
    893.         [DllImport("kernel32")] public static extern int DeleteFile(string lpFileName);
    894.         [DllImport("kernel32")] public static extern int DeviceIoControl(HANDLE hDevice, int dwIoControlCode, IntPtr lpInBuffer, int nInBufferSize, IntPtr lpOutBuffer, int nOutBufferSize, ref int lpBytesReturned, ref OVERLAPPED lpOverlapped);
    895.         [DllImport("kernel32")] public static extern int DisableThreadLibraryCalls(HANDLE hLibModule);
    896.         [DllImport("kernel32")] public static extern int DisconnectNamedPipe(HANDLE hNamedPipe);
    897.         [DllImport("kernel32")] public static extern int DosDateTimeToFileTime(int wFatDate, int wFatTime, ref FILETIME lpFileTime);
    898.         [DllImport("kernel32")] public static extern int DuplicateHandle(HANDLE hSourceProcessHandle, HANDLE hSourceHandle, HANDLE hTargetProcessHandle, ref int lpTargetHandle, int dwDesiredAccess, int bInheritHandle, int dwOptions);
    899.         [DllImport("kernel32")] public static extern int EndUpdateResource(HANDLE hUpdate, int fDiscard);
    900.         [DllImport("kernel32")] public static extern int EnumCalendarInfo(int lpCalInfoEnumProc, int Locale, int Calendar, int CalType);
    901.         [DllImport("kernel32")] public static extern int EnumResourceLanguages(HANDLE hModule, string lpType, string lpName, ref int lpEnumFunc, int lParam);
    902.         [DllImport("kernel32")] public static extern int EnumResourceNames(HANDLE hModule, string lpType, ref int lpEnumFunc, int lParam);
    903.         [DllImport("kernel32")] public static extern int EnumResourceTypes(HANDLE hModule, ref int lpEnumFunc, int lParam);
    904.         [DllImport("kernel32")] public static extern int EraseTape(HANDLE hDevice, int dwEraseType, int bimmediate);
    905.         [DllImport("kernel32")] public static extern int EscapeCommFunction(int nCid, int nFunc);
    906.         [DllImport("kernel32")] public static extern int ExpandEnvironmentStrings(string lpSrc, string lpDst, int nSize);
    907.         [DllImport("kernel32")] public static extern int FileTimeToDosDateTime(ref FILETIME lpFileTime, ref int lpFatDate, ref int lpFatTime);
    908.         [DllImport("kernel32")] public static extern int FileTimeToLocalFileTime(ref FILETIME lpFileTime, ref FILETIME lpLocalFileTime);
    909.         [DllImport("kernel32")] public static extern int FileTimeToSystemTime(ref FILETIME lpFileTime, ref SYSTEMTIME lpSystemTime);
    910.         [DllImport("kernel32")] public static extern int FillConsoleOutputAttribute(HANDLE hConsoleOutput, int wAttribute, int nLength, COORD dwWriteCoord, ref int lpNumberOfAttrsWritten);
    911.         [DllImport("kernel32")] public static extern int FillConsoleOutputCharacter(HANDLE hConsoleOutput, Byte cCharacter, int nLength, COORD dwWriteCoord, ref int lpNumberOfCharsWritten);
    912.         [DllImport("kernel32")] public static extern int FindClose(HANDLE hFindFile);
    913.         [DllImport("kernel32")] public static extern int FindCloseChangeNotification(HANDLE hChangeHandle);
    914.         [DllImport("kernel32")] public static extern int FindFirstChangeNotification(string lpPathName, int bWatchSubtree, int dwNotifyFilter);
    915.         [DllImport("kernel32")] public static extern int FindFirstFile(string lpFileName, WIN32_FIND_DATA lpFindFileData);
    916.         [DllImport("kernel32")] public static extern int FindNextChangeNotification(HANDLE hChangeHandle);
    917.         [DllImport("kernel32")] public static extern int FindNextFile(HANDLE hFindFile, WIN32_FIND_DATA lpFindFileData);
    918.         [DllImport("kernel32")] public static extern int FindResource(HANDLE hInstance, string lpName, string lpType);
    919.         [DllImport("kernel32")] public static extern int FindResourceEx(HANDLE hModule, string lpType, string lpName, int wLanguage);
    920.         [DllImport("kernel32")] public static extern int FlushConsoleInputBuffer(HANDLE hConsoleInput);
    921.         [DllImport("kernel32")] public static extern int FlushFileBuffers(HANDLE hFile);
    922.         [DllImport("kernel32")] public static extern int FlushInstructionCache(HANDLE hProcess, IntPtr lpBaseAddress, int dwSize);
    923.         [DllImport("kernel32")] public static extern int FlushViewOfFile(IntPtr lpBaseAddress, int dwNumberOfBytesToFlush);
    924.         [DllImport("kernel32")] public static extern int FoldString(int dwMapFlags, string lpSrcStr, int cchSrc, string lpDestStr, int cchDest);
    925.         [DllImport("kernel32")] public static extern int FormatMessage(int dwFlags, IntPtr lpSource, int dwMessageId, int dwLanguageId, string lpBuffer, int nSize, int Arguments);
    926.         [DllImport("kernel32")] public static extern int FreeConsole();
    927.         [DllImport("kernel32")] public static extern int FreeEnvironmentStrings(string lpsz);
    928.         [DllImport("kernel32")] public static extern int FreeLibrary(HANDLE hLibModule);
    929.         [DllImport("kernel32")] public static extern int FreeResource(HANDLE hResData);
    930.         [DllImport("kernel32")] public static extern int GenerateConsoleCtrlEvent(int dwCtrlEvent, int dwProcessGroupId);
    931.         [DllImport("kernel32")] public static extern int GetACP();
    932.         [DllImport("kernel32")] public static extern int GetBinaryType(string lpApplicationName, ref int lpBinaryType);
    933.         [DllImport("kernel32")] public static extern int GetCPInfo(int CodePage, ref CPINFO lpCPInfo);
    934.         [DllImport("kernel32")] public static extern int GetCommConfig(HANDLE hCommDev, ref COMMCONFIG lpCC, ref int lpdwSize);
    935.         [DllImport("kernel32")] public static extern int GetCommMask(HANDLE hFile, ref int lpEvtMask);
    936.         [DllImport("kernel32")] public static extern int GetCommModemStatus(HANDLE hFile, ref int lpModemStat);
    937.         [DllImport("kernel32")] public static extern int GetCommProperties(HANDLE hFile, ref COMMPROP lpCommProp);
    938.         [DllImport("kernel32")] public static extern int GetCommState(int nCid, ref DCB lpDCB);
    939.         [DllImport("kernel32")] public static extern int GetCommTimeouts(HANDLE hFile, ref COMMTIMEOUTS lpCommTimeouts);
    940.         [DllImport("kernel32")] public static extern int GetCommandLine();
    941.         [DllImport("kernel32")] public static extern int GetCompressedFileSize(string lpFileName, ref int lpFileSizeHigh);
    942.         [DllImport("kernel32")] public static extern int GetComputerName(string lpBuffer, int nSize);
    943.         [DllImport("kernel32")] public static extern int GetConsoleCP();
    944.         [DllImport("kernel32")] public static extern int GetConsoleCursorInfo(HANDLE hConsoleOutput, ref CONSOLE_CURSOR_INFO lpConsoleCursorInfo);
    945.         [DllImport("kernel32")] public static extern int GetConsoleMode(HANDLE hConsoleHandle, ref int lpMode);
    946.         [DllImport("kernel32")] public static extern int GetConsoleOutputCP();
    947.         [DllImport("kernel32")] public static extern int GetConsoleScreenBufferInfo(HANDLE hConsoleOutput, ref CONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
    948.         [DllImport("kernel32")] public static extern int GetConsoleTitle(string lpConsoleTitle, int nSize);
    949.         [DllImport("kernel32")] public static extern int GetCurrencyFormat(int Locale, int dwFlags, string lpValue, ref CURRENCYFMT lpFormat, string lpCurrencyStr, int cchCurrency);
    950.         [DllImport("kernel32")] public static extern int GetCurrentDirectory(int nBufferLength, string lpBuffer);
    951.         [DllImport("kernel32")] public static extern int GetCurrentProcess();
    952.         [DllImport("kernel32")] public static extern int GetCurrentProcessId();
    953.         [DllImport("kernel32")] public static extern int GetCurrentThread();
    954.         [DllImport("kernel32")] public static extern int GetCurrentThreadId();
    955.         [DllImport("kernel32")] public static extern int GetCurrentTime();
    956.         [DllImport("kernel32")] public static extern int GetDateFormat(int Locale, int dwFlags, ref SYSTEMTIME lpDate, string lpFormat, string lpDateStr, int cchDate);
    957.         [DllImport("kernel32")] public static extern int GetDefaultCommConfig(string lpszName, ref COMMCONFIG lpCC, ref int lpdwSize);
    958.         [DllImport("kernel32")] public static extern int GetDiskFreeSpace(string lpRootPathName, ref int lpSectorsPerCluster, ref int lpBytesPerSector, ref int lpNumberOfFreeClusters, ref int lpTotalNumberOfClusters);
    959.         [DllImport("kernel32")] public static extern int GetDriveType(string nDrive);
    960.         [DllImport("kernel32")] public static extern int GetEnvironmentVariable(string lpName, string lpBuffer, int nSize);
    961.         [DllImport("kernel32")] public static extern int GetExitCodeProcess(HANDLE hProcess, ref int lpExitCode);
    962.         [DllImport("kernel32")] public static extern int GetExitCodeThread(HANDLE hThread, ref int lpExitCode);
    963.         [DllImport("kernel32")] public static extern int GetFileAttributes(string lpFileName);
    964.         [DllImport("kernel32")] public static extern int GetFileInformationByHandle(HANDLE hFile, ref BY_HANDLE_FILE_INFORMATION lpFileInformation);
    965.         [DllImport("kernel32")] public static extern int GetFileSize(HANDLE hFile, ref int lpFileSizeHigh);
    966.         [DllImport("kernel32")] public static extern int GetFileTime(HANDLE hFile, ref FILETIME lpCreationTime, ref FILETIME lpLastAccessTime, ref FILETIME lpLastWriteTime);
    967.         [DllImport("kernel32")] public static extern int GetFileType(HANDLE hFile);
    968.         [DllImport("kernel32")] public static extern int GetFullPathName(string lpFileName, int nBufferLength, StringBuilder lpBuffer, string lpFilePart);
    969.         [DllImport("kernel32")] public static extern int GetHandleInformation(HANDLE hObject, ref int lpdwFlags);
    970.         [DllImport("kernel32")] public static extern int GetLastError();
    971.         [DllImport("kernel32")] public static extern int GetLocaleInfo(int Locale, int LCType, string lpLCData, int cchData);
    972.         [DllImport("kernel32")] public static extern int GetLogicalDriveStrings(int nBufferLength, StringBuilder lpBuffer);
    973.         [DllImport("kernel32")] public static extern int GetLogicalDrives();
    974.         [DllImport("kernel32")] public static extern int GetMailslotInfo(HANDLE hMailslot, ref int lpMaxMessageSize, ref int lpNextSize, ref int lpMessageCount, ref int lpReadTimeout);
    975.         [DllImport("kernel32")] public static extern int GetModuleFileName(HANDLE hModule, StringBuilder lpFileName, int nSize);
    976.         [DllImport("kernel32")] public static extern int GetModuleHandle(string lpModuleName);
    977.         [DllImport("kernel32")] public static extern int GetNamedPipeHandleState(HANDLE hNamedPipe, ref int lpState, ref int lpCurInstances, ref int lpMaxCollectionCount, ref int lpCollectDataTimeout, string lpUserName, int nMaxUserNameSize);
    978.         [DllImport("kernel32")] public static extern int GetNamedPipeInfo(HANDLE hNamedPipe, ref int lpFlags, ref int lpOutBufferSize, ref int lpInBufferSize, ref int lpMaxInstances);
    979.         [DllImport("kernel32")] public static extern int GetNumberFormat(int Locale, int dwFlags, string lpValue, ref NUMBERFMT lpFormat, string lpNumberStr, int cchNumber);
    980.         [DllImport("kernel32")] public static extern int GetNumberOfConsoleInputEvents(HANDLE hConsoleInput, ref int lpNumberOfEvents);
    981.         [DllImport("kernel32")] public static extern int GetNumberOfConsoleMouseButtons(int lpNumberOfMouseButtons);
    982.         [DllImport("kernel32")] public static extern int GetOEMCP();
    983.         [DllImport("kernel32")] public static extern int GetOverlappedResult(HANDLE hFile, ref OVERLAPPED lpOverlapped, ref int lpNumberOfBytesTransferred, int bWait);
    984.         [DllImport("kernel32")] public static extern int GetPriorityClass(HANDLE hProcess);
    985.         [DllImport("kernel32")] public static extern int GetPrivateProfileInt(string lpApplicationName, string lpKeyName, int nDefault, string lpFileName);
    986.         [DllImport("kernel32")] public static extern int GetPrivateProfileSection(string lpAppName, StringBuilder lpReturnedString, int nSize, string lpFileName);
    987.         [DllImport("kernel32")] public static extern int GetPrivateProfileString(string lpApplicationName, IntPtr lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);
    988.         [DllImport("kernel32")] public static extern int GetPrivateProfileString(string lpApplicationName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);
    989.         [DllImport("kernel32")] public static extern int GetProcessAffinityMask(HANDLE hProcess, ref int lpProcessAffinityMask, int SystemAffinityMask);
    990.         [DllImport("kernel32")] public static extern int GetProcessHeap();
    991.         [DllImport("kernel32")] public static extern int GetProcessHeaps(int NumberOfHeaps, int ProcessHeaps);
    992.         [DllImport("kernel32")] public static extern int GetProcessShutdownParameters(int lpdwLevel, ref int lpdwFlags);
    993.         [DllImport("kernel32")] public static extern int GetProcessTimes(HANDLE hProcess, ref FILETIME lpCreationTime, ref FILETIME lpExitTime, ref FILETIME lpKernelTime, ref FILETIME lpUserTime);
    994.         [DllImport("kernel32")] public static extern int GetProcessWorkingSetSize(HANDLE hProcess, ref int lpMinimumWorkingSetSize, ref int lpMaximumWorkingSetSize);
    995.         [DllImport("kernel32")] public static extern int GetProfileInt(string lpAppName, string lpKeyName, int nDefault);
    996.         [DllImport("kernel32")] public static extern int GetProfileSection(string lpAppName, string lpReturnedString, int nSize);
    997.         [DllImport("kernel32")] public static extern int GetProfileString(string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize);
    998.         [DllImport("kernel32")] public static extern int GetQueuedCompletionStatus(int CompletionPort, ref int lpNumberOfBytesTransferred, ref int lpCompletionKey, ref int lpOverlapped, int dwMilliseconds);
    999.         [DllImport("kernel32")] public static extern int GetShortPathName(string lpszLongPath, string lpszShortPath, int cchBuffer);
    1000.         [DllImport("kernel32")] public static extern int GetStdHandle(int nStdHandle);
    1001.         [DllImport("kernel32")] public static extern int GetStringTypeA(int lcid, int dwInfoType, string lpSrcStr, int cchSrc, ref int lpCharType);
    1002.         [DllImport("kernel32")] public static extern int GetStringTypeEx(int Locale, int dwInfoType, string lpSrcStr, int cchSrc, short lpCharType);
    1003.         [DllImport("kernel32")] public static extern int GetStringTypeW(int dwInfoType, string lpSrcStr, int cchSrc, short lpCharType);
    1004.         [DllImport("kernel32")] public static extern int GetSystemDefaultLCID();
    1005.         [DllImport("kernel32")] public static extern int GetSystemDirectory(StringBuilder lpBuffer, int nSize);
    1006.         [DllImport("kernel32")] public static extern int GetSystemPowerStatus(ref SYSTEM_POWER_STATUS lpSystemPowerStatus);
    1007.         [DllImport("kernel32")] public static extern int GetSystemTimeAdjustment(int lpTimeAdjustment, ref int lpTimeIncrement, ref int lpTimeAdjustmentDisabled);
    1008.         [DllImport("kernel32")] public static extern int GetTapeParameters(HANDLE hDevice, int dwOperation, ref int lpdwSize, IntPtr lpTapeInformation);
    1009.         [DllImport("kernel32")] public static extern int GetTapePosition(HANDLE hDevice, int dwPositionType, ref int lpdwPartition, ref int lpdwOffsetLow, ref int lpdwOffsetHigh);
    1010.         [DllImport("kernel32")] public static extern int GetTapeStatus(HANDLE hDevice);
    1011.         [DllImport("kernel32")] public static extern int GetTempFileName(string lpszPath, string lpPrefixString, int wUnique, StringBuilder lpTempFileName);
    1012.         [DllImport("kernel32")] public static extern int GetTempPath(int nBufferLength, StringBuilder lpBuffer);
    1013.         [DllImport("kernel32")] public static extern int GetThreadContext(HANDLE hThread, ref CONTEXT lpContext);
    1014.         [DllImport("kernel32")] public static extern int GetThreadPriority(HANDLE hThread);
    1015.         [DllImport("kernel32")] public static extern int GetThreadSelectorEntry(HANDLE hThread, int dwSelector, ref LDT_ENTRY lpSelectorEntry);
    1016.         [DllImport("kernel32")] public static extern int GetThreadTimes(HANDLE hThread, ref FILETIME lpCreationTime, ref FILETIME lpExitTime, ref FILETIME lpKernelTime, ref FILETIME lpUserTime);
    1017.         [DllImport("kernel32")] public static extern int GetTickCount();
    1018.         [DllImport("kernel32")] public static extern int GetTimeFormat(int Locale, int dwFlags, ref SYSTEMTIME lpTime, string lpFormat, string lpTimeStr, int cchTime);
    1019.         [DllImport("kernel32")] public static extern int GetTimeZoneInformation(ref TIME_ZONE_INFORMATION lpTimeZoneInformation);
    1020.         [DllImport("kernel32")] public static extern int GetUserDefaultLCID();
    1021.         [DllImport("kernel32")] public static extern int GetVersion();
    1022.         [DllImport("kernel32")] public static extern int GetVersionEx(ref OSVERSIONINFO lpVersionInformation);
    1023.         [DllImport("kernel32")] public static extern int GetVolumeInformation(string lpRootPathName, string lpVolumeNameBuffer, int nVolumeNameSize, ref int lpVolumeSerialNumber, ref int lpMaximumComponentLength, ref int lpFileSystemFlags, string lpFileSystemNameBuffer, int nFileSystemNameSize);
    1024.         [DllImport("kernel32")] public static extern int GetWindowsDirectory(StringBuilder lpBuffer, int nSize);
    1025.         [DllImport("kernel32")] public static extern int GlobalAlloc(int wFlags, int dwBytes);
    1026.         [DllImport("kernel32")] public static extern int GlobalCompact(int dwMinFree);
    1027.         [DllImport("kernel32")] public static extern int GlobalFlags(HANDLE hMem);
    1028.         [DllImport("kernel32")] public static extern int GlobalFree(HANDLE hMem);
    1029.         [DllImport("kernel32")] public static extern int GlobalGetAtomName(short nAtom, string lpBuffer, int nSize);
    1030.         [DllImport("kernel32")] public static extern int GlobalHandle(IntPtr wMem);
    1031.         [DllImport("kernel32")] public static extern int GlobalLock(HANDLE hMem);
    1032.         [DllImport("kernel32")] public static extern int GlobalReAlloc(HANDLE hMem, int dwBytes, int wFlags);
    1033.         [DllImport("kernel32")] public static extern int GlobalSize(HANDLE hMem);
    1034.         [DllImport("kernel32")] public static extern int GlobalUnWire(HANDLE hMem);
    1035.         [DllImport("kernel32")] public static extern int GlobalUnlock(HANDLE hMem);
    1036.         [DllImport("kernel32")] public static extern int GlobalWire(HANDLE hMem);
    1037.         [DllImport("kernel32")] public static extern int HeapAlloc(HANDLE hHeap, int dwFlags, int dwBytes);
    1038.         [DllImport("kernel32")] public static extern int HeapCompact(HANDLE hHeap, int dwFlags);
    1039.         [DllImport("kernel32")] public static extern int HeapCreate(int flOptions, int dwInitialSize, int dwMaximumSize);
    1040.         [DllImport("kernel32")] public static extern int HeapDestroy(HANDLE hHeap);
    1041.         [DllImport("kernel32")] public static extern int HeapFree(HANDLE hHeap, int dwFlags, IntPtr lpMem);
    1042.         [DllImport("kernel32")] public static extern int HeapLock(HANDLE hHeap);
    1043.         [DllImport("kernel32")] public static extern int HeapReAlloc(HANDLE hHeap, int dwFlags, IntPtr lpMem, int dwBytes);
    1044.         [DllImport("kernel32")] public static extern int HeapSize(HANDLE hHeap, int dwFlags, IntPtr lpMem);
    1045.         [DllImport("kernel32")] public static extern int HeapUnlock(HANDLE hHeap);
    1046.         [DllImport("kernel32")] public static extern int HeapValidate(HANDLE hHeap, int dwFlags, IntPtr lpMem);
    1047.         [DllImport("kernel32")] public static extern int InitAtomTable(int nSize);
    1048.         [DllImport("kernel32")] public static extern int InterlockedDecrement(int lpAddend);
    1049.         [DllImport("kernel32")] public static extern int InterlockedExchange(int Target, int Value);
    1050.         [DllImport("kernel32")] public static extern int InterlockedIncrement(int lpAddend);
    1051.         [DllImport("kernel32")] public static extern int IsBadCodePtr(int lpfn);
    1052.         [DllImport("kernel32")] public static extern int IsBadHugeReadPtr(IntPtr lp, int ucb);
    1053.         [DllImport("kernel32")] public static extern int IsBadHugeWritePtr(IntPtr lp, int ucb);
    1054.         [DllImport("kernel32")] public static extern int IsBadReadPtr(IntPtr lp, int ucb);
    1055.         [DllImport("kernel32")] public static extern int IsBadStringPtr(string lpsz, int ucchMax);
    1056.         [DllImport("kernel32")] public static extern int IsBadWritePtr(IntPtr lp, int ucb);
    1057.         [DllImport("kernel32")] public static extern int IsDBCSLeadByte(Byte bTestChar);
    1058.         [DllImport("kernel32")] public static extern int IsValidCodePage(int CodePage);
    1059.         [DllImport("kernel32")] public static extern int LCMapString(int Locale, int dwMapFlags, string lpSrcStr, int cchSrc, string lpDestStr, int cchDest);
    1060.         [DllImport("kernel32")] public static extern int LoadLibrary(string lpLibFileName);
    1061.         [DllImport("kernel32")] public static extern int LoadLibraryEx(string lpLibFileName, HANDLE hFile, int dwFlags);
    1062.         [DllImport("kernel32")] public static extern int LoadModule(string lpModuleName, IntPtr lpParameterBlock);
    1063.         [DllImport("kernel32")] public static extern int LoadResource(HANDLE hInstance, HANDLE hResInfo);
    1064.         [DllImport("kernel32")] public static extern int LocalAlloc(int wFlags, int wBytes);
    1065.         [DllImport("kernel32")] public static extern int LocalCompact(int uMinFree);
    1066.         [DllImport("kernel32")] public static extern int LocalFileTimeToFileTime(ref FILETIME lpLocalFileTime, ref FILETIME lpFileTime);
    1067.         [DllImport("kernel32")] public static extern int LocalFlags(HANDLE hMem);
    1068.         [DllImport("kernel32")] public static extern int LocalFree(HANDLE hMem);
    1069.         [DllImport("kernel32")] public static extern int LocalHandle(HANDLE hMem);
    1070.         [DllImport("kernel32")] public static extern int LocalLock(HANDLE hMem);
    1071.         [DllImport("kernel32")] public static extern int LocalReAlloc(HANDLE hMem, int wBytes, int wFlags);
    1072.         [DllImport("kernel32")] public static extern int LocalShrink(HANDLE hMem, int cbNewSize);
    1073.         [DllImport("kernel32")] public static extern int LocalSize(HANDLE hMem);
    1074.         [DllImport("kernel32")] public static extern int LocalUnlock(HANDLE hMem);
    1075.         [DllImport("kernel32")] public static extern int LockFile(HANDLE hFile, int dwFileOffsetLow, int dwFileOffsetHigh, int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh);
    1076.         [DllImport("kernel32")] public static extern int LockFileEx(HANDLE hFile, int dwFlags, int dwReserved, int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh, ref OVERLAPPED lpOverlapped);
    1077.         [DllImport("kernel32")] public static extern int LockResource(HANDLE hResData);
    1078.         [DllImport("kernel32")] public static extern int MapViewOfFile(HANDLE hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap);
    1079.         [DllImport("kernel32")] public static extern int MapViewOfFileEx(HANDLE hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap, IntPtr lpBaseAddress);
    1080.         [DllImport("kernel32")] public static extern int MoveFile(string lpExistingFileName, string lpNewFileName);
    1081.         [DllImport("kernel32")] public static extern int MoveFileEx(string lpExistingFileName, string lpNewFileName, int dwFlags);
    1082.         [DllImport("kernel32")] public static extern int MulDiv(int nNumber, int nNumerator, int nDenominator);
    1083.         [DllImport("kernel32")] public static extern int MultiByteToWideChar(int CodePage, int dwFlags, string lpMultiByteStr, int cchMultiByte, string lpWideCharStr, int cchWideChar);
    1084.         [DllImport("kernel32")] public static extern int OpenEvent(int dwDesiredAccess, int bInheritHandle, string lpName);
    1085.         [DllImport("kernel32")] public static extern int OpenFile(string lpFileName, ref OFSTRUCT lpReOpenBuff, int wStyle);
    1086.         [DllImport("kernel32")] public static extern int OpenFileMapping(int dwDesiredAccess, int bInheritHandle, string lpName);
    1087.         [DllImport("kernel32")] public static extern int OpenMutex(int dwDesiredAccess, int bInheritHandle, string lpName);
    1088.         [DllImport("kernel32")] public static extern int OpenProcess(int dwDesiredAccess, int bInheritHandle, int dwProcessId);
    1089.         [DllImport("kernel32")] public static extern int OpenSemaphore(int dwDesiredAccess, int bInheritHandle, string lpName);
    1090.         [DllImport("kernel32")] public static extern int PeekNamedPipe(HANDLE hNamedPipe, IntPtr lpBuffer, int nBufferSize, ref int lpBytesRead, ref int lpTotalBytesAvail, ref int lpBytesLeftThisMessage);
    1091.         [DllImport("kernel32")] public static extern int PrepareTape(HANDLE hDevice, int dwOperation, int bimmediate);
    1092.         [DllImport("kernel32")] public static extern int PulseEvent(HANDLE hEvent);
    1093.         [DllImport("kernel32")] public static extern int PurgeComm(HANDLE hFile, int dwFlags);
    1094.         [DllImport("kernel32")] public static extern int QueryDosDevice(string lpDeviceName, string lpTargetPath, int ucchMax);
    1095.         [DllImport("kernel32")] public static extern int QueryPerformanceCounter(ref LARGE_INTEGER lpPerformanceCount);
    1096.         [DllImport("kernel32")] public static extern int QueryPerformanceFrequency(ref LARGE_INTEGER lpFrequency);
    1097.         [DllImport("kernel32")] public static extern int ReadConsole(HANDLE hConsoleInput, IntPtr lpBuffer, int nNumberOfCharsToRead, ref int lpNumberOfCharsRead, IntPtr lpReserved);
    1098.         [DllImport("kernel32")] public static extern int ReadConsoleOutput(HANDLE hConsoleOutput, ref CHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, ref SMALL_RECT lpReadRegion);
    1099.         [DllImport("kernel32")] public static extern int ReadConsoleOutputAttribute(HANDLE hConsoleOutput, ref int lpAttribute, int nLength, COORD dwReadCoord, ref int lpNumberOfAttrsRead);
    1100.         [DllImport("kernel32")] public static extern int ReadConsoleOutputCharacter(HANDLE hConsoleOutput, string lpCharacter, int nLength, COORD dwReadCoord, ref int lpNumberOfCharsRead);
    1101.         [DllImport("kernel32")] public static extern int ReadFile(HANDLE hFile, IntPtr lpBuffer, int nNumberOfBytesToRead, ref int lpNumberOfBytesRead, ref OVERLAPPED lpOverlapped);
    1102.         [DllImport("kernel32")] public static extern int ReadFileEx(HANDLE hFile, IntPtr lpBuffer, int nNumberOfBytesToRead, ref OVERLAPPED lpOverlapped, ref int lpCompletionRoutine);
    1103.         [DllImport("kernel32")] public static extern int ReadProcessMemory(HANDLE hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, ref int lpNumberOfBytesWritten);
    1104.         [DllImport("kernel32")] public static extern int ReleaseMutex(HANDLE hMutex);
    1105.         [DllImport("kernel32")] public static extern int ReleaseSemaphore(HANDLE hSemaphore, int lReleaseCount, ref int lpPreviousCount);
    1106.         [DllImport("kernel32")] public static extern int RemoveDirectory(string lpPathName);
    1107.         [DllImport("kernel32")] public static extern int ResetEvent(HANDLE hEvent);
    1108.         [DllImport("kernel32")] public static extern int ResumeThread(HANDLE hThread);
    1109.         [DllImport("kernel32")] public static extern int ScrollConsoleScreenBuffer(HANDLE hConsoleOutput, ref SMALL_RECT lpScrollRectangle, ref SMALL_RECT lpClipRectangle, COORD dwDestinationOrigin, ref CHAR_INFO lpFill);
    1110.         [DllImport("kernel32")] public static extern int SearchPath(string lpPath, string lpFileName, string lpExtension, int nBufferLength, string lpBuffer, string lpFilePart);
    1111.         [DllImport("kernel32")] public static extern int SetCommBreak(int nCid);
    1112.         [DllImport("kernel32")] public static extern int SetCommConfig(HANDLE hCommDev, ref COMMCONFIG lpCC, int dwSize);
    1113.         [DllImport("kernel32")] public static extern int SetCommMask(HANDLE hFile, int dwEvtMask);
    1114.         [DllImport("kernel32")] public static extern int SetCommState(HANDLE hCommDev, ref DCB lpDCB);
    1115.         [DllImport("kernel32")] public static extern int SetCommTimeouts(HANDLE hFile, ref COMMTIMEOUTS lpCommTimeouts);
    1116.         [DllImport("kernel32")] public static extern int SetComputerName(string lpComputerName);
    1117.         [DllImport("kernel32")] public static extern int SetConsoleActiveScreenBuffer(HANDLE hConsoleOutput);
    1118.         [DllImport("kernel32")] public static extern int SetConsoleCP(int wCodePageID);
    1119.         [DllImport("kernel32")] public static extern int SetConsoleCtrlHandler(int HandlerRoutine, int Add);
    1120.         [DllImport("kernel32")] public static extern int SetConsoleCursorInfo(HANDLE hConsoleOutput, ref CONSOLE_CURSOR_INFO lpConsoleCursorInfo);
    1121.         [DllImport("kernel32")] public static extern int SetConsoleCursorPosition(HANDLE hConsoleOutput, COORD dwCursorPosition);
    1122.         [DllImport("kernel32")] public static extern int SetConsoleMode(HANDLE hConsoleHandle, int dwMode);
    1123.         [DllImport("kernel32")] public static extern int SetConsoleOutputCP(int wCodePageID);
    1124.         [DllImport("kernel32")] public static extern int SetConsoleScreenBufferSize(HANDLE hConsoleOutput, COORD dwSize);
    1125.         [DllImport("kernel32")] public static extern int SetConsoleTextAttribute(HANDLE hConsoleOutput, int wAttributes);
    1126.         [DllImport("kernel32")] public static extern int SetConsoleTitle(string lpConsoleTitle);
    1127.         [DllImport("kernel32")] public static extern int SetConsoleWindowInfo(HANDLE hConsoleOutput, int bAbsolute, ref SMALL_RECT lpConsoleWindow);
    1128.         [DllImport("kernel32")] public static extern int SetCurrentDirectory(string lpPathName);
    1129.         [DllImport("kernel32")] public static extern int SetDefaultCommConfig(string lpszName, ref COMMCONFIG lpCC, int dwSize);
    1130.         [DllImport("kernel32")] public static extern int SetEndOfFile(HANDLE hFile);
    1131.         [DllImport("kernel32")] public static extern int SetEnvironmentVariable(string lpName, string lpValue);
    1132.         [DllImport("kernel32")] public static extern int SetErrorMode(int wMode);
    1133.         [DllImport("kernel32")] public static extern int SetEvent(HANDLE hEvent);
    1134.         [DllImport("kernel32")] public static extern int SetFileAttributes(string lpFileName, int dwFileAttributes);
    1135.         [DllImport("kernel32")] public static extern int SetFilePointer(HANDLE hFile, int lDistanceToMove, ref int lpDistanceToMoveHigh, int dwMoveMethod);
    1136.         [DllImport("kernel32")] public static extern int SetFileTime(HANDLE hFile, ref FILETIME lpCreationTime, ref FILETIME lpLastAccessTime, ref FILETIME lpLastWriteTime);
    1137.         [DllImport("kernel32")] public static extern int SetHandleCount(int wNumber);
    1138.         [DllImport("kernel32")] public static extern int SetHandleInformation(HANDLE hObject, int dwMask, int dwFlags);
    1139.         [DllImport("kernel32")] public static extern int SetLocalTime(ref SYSTEMTIME lpSystemTime);
    1140.         [DllImport("kernel32")] public static extern int SetLocaleInfo(int Locale, int LCType, string lpLCData);
    1141.         [DllImport("kernel32")] public static extern int SetMailslotInfo(HANDLE hMailslot, int lReadTimeout);
    1142.         [DllImport("kernel32")] public static extern int SetNamedPipeHandleState(HANDLE hNamedPipe, ref int lpMode, ref int lpMaxCollectionCount, ref int lpCollectDataTimeout);
    1143.         [DllImport("kernel32")] public static extern int SetPriorityClass(HANDLE hProcess, int dwPriorityClass);
    1144.         [DllImport("kernel32")] public static extern int SetProcessShutdownParameters(int dwLevel, int dwFlags);
    1145.         [DllImport("kernel32")] public static extern int SetProcessWorkingSetSize(HANDLE hProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize);
    1146.         [DllImport("kernel32")] public static extern int SetStdHandle(int nStdHandle, int nHandle);
    1147.         [DllImport("kernel32")] public static extern int SetSystemPowerState(int fSuspend, int fForce);
    1148.         [DllImport("kernel32")] public static extern int SetSystemTime(ref SYSTEMTIME lpSystemTime);
    1149.         [DllImport("kernel32")] public static extern int SetTapeParameters(HANDLE hDevice, int dwOperation, IntPtr lpTapeInformation);
    1150.         [DllImport("kernel32")] public static extern int SetTapePosition(HANDLE hDevice, int dwPositionMethod, int dwPartition, int dwOffsetLow, int dwOffsetHigh, int bimmediate);
    1151.         [DllImport("kernel32")] public static extern int SetThreadAffinityMask(HANDLE hThread, int dwThreadAffinityMask);
    1152.         [DllImport("kernel32")] public static extern int SetThreadContext(HANDLE hThread, ref CONTEXT lpContext);
    1153.         [DllImport("kernel32")] public static extern int SetThreadLocale(int Locale);
    1154.         [DllImport("kernel32")] public static extern int SetThreadPriority(HANDLE hThread, int nPriority);
    1155.         [DllImport("kernel32")] public static extern int SetTimeZoneInformation(ref TIME_ZONE_INFORMATION lpTimeZoneInformation);
    1156.         [DllImport("kernel32")] public static extern int SetUnhandledExceptionFilter(int lpTopLevelExceptionFilter);
    1157.         [DllImport("kernel32")] public static extern int SetVolumeLabel(string lpRootPathName, string lpVolumeName);
    1158.         [DllImport("kernel32")] public static extern int SetupComm(HANDLE hFile, int dwInQueue, int dwOutQueue);
    1159.         [DllImport("kernel32")] public static extern int SizeofResource(HANDLE hInstance, HANDLE hResInfo);
    1160.         [DllImport("kernel32")] public static extern int SleepEx(int dwMilliseconds, int bAlertable);
    1161.         [DllImport("kernel32")] public static extern int SuspendThread(HANDLE hThread);
    1162.         [DllImport("kernel32")] public static extern int SystemTimeToFileTime(ref SYSTEMTIME lpSystemTime, ref FILETIME lpFileTime);
    1163.         [DllImport("kernel32")] public static extern int SystemTimeToTzSpecificLocalTime(ref TIME_ZONE_INFORMATION lpTimeZoneInformation, ref SYSTEMTIME lpUniversalTime, ref SYSTEMTIME lpLocalTime);
    1164.         [DllImport("kernel32")] public static extern int TerminateProcess(HANDLE hProcess, int uExitCode);
    1165.         [DllImport("kernel32")] public static extern int TerminateThread(HANDLE hThread, int dwExitCode);
    1166.         [DllImport("kernel32")] public static extern int TlsAlloc();
    1167.         [DllImport("kernel32")] public static extern int TlsFree(int dwTlsIndex);
    1168.         [DllImport("kernel32")] public static extern int TlsGetValue(int dwTlsIndex);
    1169.         [DllImport("kernel32")] public static extern int TlsSetValue(int dwTlsIndex, IntPtr lpTlsValue);
    1170.         [DllImport("kernel32")] public static extern int TransactNamedPipe(HANDLE hNamedPipe, IntPtr lpInBuffer, int nInBufferSize, IntPtr lpOutBuffer, int nOutBufferSize, ref int lpBytesRead, ref OVERLAPPED lpOverlapped);
    1171.         [DllImport("kernel32")] public static extern int TransmitCommChar(int nCid, Byte cChar);
    1172.         [DllImport("kernel32")] public static extern int UnhandledExceptionFilter(ref EXCEPTION_POINTERS ExceptionInfo);
    1173.         [DllImport("kernel32")] public static extern int UnlockFile(HANDLE hFile, int dwFileOffsetLow, int dwFileOffsetHigh, int nNumberOfBytesToUnlockLow, int nNumberOfBytesToUnlockHigh);
    1174.         [DllImport("kernel32")] public static extern int UnlockFileEx(HANDLE hFile, int dwReserved, int nNumberOfBytesToUnlockLow, int nNumberOfBytesToUnlockHigh, ref OVERLAPPED lpOverlapped);
    1175.         [DllImport("kernel32")] public static extern int UnmapViewOfFile(IntPtr lpBaseAddress);
    1176.         [DllImport("kernel32")] public static extern int UpdateResource(HANDLE hUpdate, string lpType, string lpName, int wLanguage, IntPtr lpData, int cbData);
    1177.         [DllImport("kernel32")] public static extern int VerLanguageName(int wLang, string szLang, int nSize);
    1178.         [DllImport("kernel32")] public static extern int VirtualAlloc(IntPtr lpAddress, int dwSize, int flAllocationType, int flProtect);
    1179.         [DllImport("kernel32")] public static extern int VirtualFree(IntPtr lpAddress, int dwSize, int dwFreeType);
    1180.         [DllImport("kernel32")] public static extern int VirtualLock(IntPtr lpAddress, int dwSize);
    1181.         [DllImport("kernel32")] public static extern int VirtualProtect(IntPtr lpAddress, int dwSize, int flNewProtect, ref int lpflOldProtect);
    1182.         [DllImport("kernel32")] public static extern int VirtualProtectEx(HANDLE hProcess, IntPtr lpAddress, int dwSize, int flNewProtect, ref int lpflOldProtect);
    1183.         [DllImport("kernel32")] public static extern int VirtualQuery(IntPtr lpAddress, ref MEMORY_BASIC_INFORMATION lpBuffer, int dwLength);
    1184.         [DllImport("kernel32")] public static extern int VirtualQueryEx(HANDLE hProcess, IntPtr lpAddress, ref MEMORY_BASIC_INFORMATION lpBuffer, int dwLength);
    1185.         [DllImport("kernel32")] public static extern int VirtualUnlock(IntPtr lpAddress, int dwSize);
    1186.         [DllImport("kernel32")] public static extern int WaitCommEvent(HANDLE hFile, ref int lpEvtMask, ref OVERLAPPED lpOverlapped);
    1187.         [DllImport("kernel32")] public static extern int WaitForMultipleObjects(int nCount, ref int lpHandles, int bWaitAll, int dwMilliseconds);
    1188.         [DllImport("kernel32")] public static extern int WaitForMultipleObjectsEx(int nCount, ref int lpHandles, int bWaitAll, int dwMilliseconds, int bAlertable);
    1189.         [DllImport("kernel32")] public static extern int WaitForSingleObject(HANDLE hHandle, int dwMilliseconds);
    1190.         [DllImport("kernel32")] public static extern int WaitForSingleObjectEx(HANDLE hHandle, int dwMilliseconds, int bAlertable);
    1191.         [DllImport("kernel32")] public static extern int WaitNamedPipe(string lpNamedPipeName, int nTimeOut);
    1192.         [DllImport("kernel32")] public static extern int WideCharToMultiByte(int CodePage, int dwFlags, string lpWideCharStr, int cchWideChar, string lpMultiByteStr, int cchMultiByte, string lpDefaultChar, ref int lpUsedDefaultChar);
    1193.         [DllImport("kernel32")] public static extern int WinExec(string lpCmdLine, int nCmdShow);
    1194.         [DllImport("kernel32")] public static extern int WriteConsole(HANDLE hConsoleOutput, IntPtr lpBuffer, int nNumberOfCharsToWrite, ref int lpNumberOfCharsWritten, IntPtr lpReserved);
    1195.         [DllImport("kernel32")] public static extern int WriteConsoleOutput(HANDLE hConsoleOutput, ref CHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, ref SMALL_RECT lpWriteRegion);
    1196.         [DllImport("kernel32")] public static extern int WriteConsoleOutputAttribute(HANDLE hConsoleOutput, short lpAttribute, int nLength, COORD dwWriteCoord, ref int lpNumberOfAttrsWritten);
    1197.         [DllImport("kernel32")] public static extern int WriteConsoleOutputCharacter(HANDLE hConsoleOutput, string lpCharacter, int nLength, COORD dwWriteCoord, ref int lpNumberOfCharsWritten);
    1198.         [DllImport("kernel32")] public static extern int WriteFile(HANDLE hFile, IntPtr lpBuffer, int nNumberOfBytesToWrite, ref int lpNumberOfBytesWritten, ref OVERLAPPED lpOverlapped);
    1199.         [DllImport("kernel32")] public static extern int WriteFileEx(HANDLE hFile, IntPtr lpBuffer, int nNumberOfBytesToWrite, ref OVERLAPPED lpOverlapped, ref int lpCompletionRoutine);
    1200.         [DllImport("kernel32")] public static extern int WritePrivateProfileSection(string lpAppName, string lpString, string lpFileName);
    1201.         [DllImport("kernel32")] public static extern int WritePrivateProfileString(string lpApplicationName, IntPtr lpKeyName, IntPtr lpString, string lpFileName);
    1202.         [DllImport("kernel32")] public static extern int WritePrivateProfileString(string lpApplicationName, string lpKeyName, IntPtr lpString, string lpFileName);
    1203.         [DllImport("kernel32")] public static extern int WriteProcessMemory(HANDLE hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, ref int lpNumberOfBytesWritten);
    1204.         [DllImport("kernel32")] public static extern int WriteProfileSection(string lpAppName, string lpString);
    1205.         [DllImport("kernel32")] public static extern int WriteProfileString(string lpszSection, string lpszKeyName, string lpszString);
    1206.         [DllImport("kernel32")] public static extern int WriteTapemark(HANDLE hDevice, int dwTapemarkType, int dwTapemarkCount, int bimmediate);
    1207.         [DllImport("kernel32")] public static extern int hread(HANDLE hFile, IntPtr lpBuffer, int lBytes);
    1208.         [DllImport("kernel32")] public static extern int hwrite(HANDLE hFile, string lpBuffer, int lBytes);
    1209.         [DllImport("kernel32")] public static extern int lclose(HANDLE hFile);
    1210.         [DllImport("kernel32")] public static extern int lcreat(string lpPathName, int iAttribute);
    1211.         [DllImport("kernel32")] public static extern int llseek(HANDLE hFile, int lOffset, int iOrigin);
    1212.         [DllImport("kernel32")] public static extern int lopen(string lpPathName, int iReadWrite);
    1213.         [DllImport("kernel32")] public static extern int lread(HANDLE hFile, IntPtr lpBuffer, int wBytes);
    1214.         [DllImport("kernel32")] public static extern int lstrcat(string lpString1, string lpString2);
    1215.         [DllImport("kernel32")] public static extern int lstrcmp(string lpString1, string lpString2);
    1216.         [DllImport("kernel32")] public static extern int lstrcmpi(string lpString1, string lpString2);
    1217.         [DllImport("kernel32")] public static extern int lstrcpy(string lpString1, string lpString2);
    1218.         [DllImport("kernel32")] public static extern int lstrcpyn(string lpString1, string lpString2, int iMaxLength);
    1219.         [DllImport("kernel32")] public static extern int lstrlen(string lpString);
    1220.         [DllImport("kernel32")] public static extern int lwrite(HANDLE hFile, string lpBuffer, int wBytes);
    1221.         [DllImport("kernel32")] public static extern short GetSystemDefaultLangID();
    1222.         [DllImport("kernel32")] public static extern short GetUserDefaultLangID();
    1223.         [DllImport("kernel32")] public static extern short GlobalAddAtom(string lpString);
    1224.         [DllImport("kernel32")] public static extern short GlobalDeleteAtom(short nAtom);
    1225.         [DllImport("kernel32")] public static extern short GlobalFindAtom(string lpString);
    1226.         [DllImport("kernel32")] public static extern string GetEnvironmentStrings();
    1227.         [DllImport("kernel32")] public static extern void CopyMemory(IntPtr Destination, IntPtr Source, int Length);
    1228.         [DllImport("kernel32")] public static extern void DebugBreak();
    1229.         [DllImport("kernel32")] public static extern void DeleteCriticalSection(ref CRITICAL_SECTION lpCriticalSection);
    1230.         [DllImport("kernel32")] public static extern void EnterCriticalSection(ref CRITICAL_SECTION lpCriticalSection);
    1231.         [DllImport("kernel32")] public static extern void ExitProcess(int uExitCode);
    1232.         [DllImport("kernel32")] public static extern void ExitThread(int dwExitCode);
    1233.         [DllImport("kernel32")] public static extern void FatalAppExit(int uAction, string lpMessageText);
    1234.         [DllImport("kernel32")] public static extern void FatalExit(int code);
    1235.         [DllImport("kernel32")] public static extern void FreeLibraryAndExitThread(HANDLE hLibModule, int dwExitCode);
    1236.         [DllImport("kernel32")] public static extern void GetLocalTime(ref SYSTEMTIME lpSystemTime);
    1237.         [DllImport("kernel32")] public static extern void GetStartupInfo(ref STARTUPINFO lpStartupInfo);
    1238.         [DllImport("kernel32")] public static extern void GetSystemInfo(ref SYSTEM_INFO lpSystemInfo);
    1239.         [DllImport("kernel32")] public static extern void GetSystemTime(ref SYSTEMTIME lpSystemTime);
    1240.         [DllImport("kernel32")] public static extern void GlobalFix(HANDLE hMem);
    1241.         [DllImport("kernel32")] public static extern void GlobalMemoryStatus(ref MEMORYSTATUS lpBuffer);
    1242.         [DllImport("kernel32")] public static extern void GlobalUnfix(HANDLE hMem);
    1243.         [DllImport("kernel32")] public static extern void InitializeCriticalSection(ref CRITICAL_SECTION lpCriticalSection);
    1244.         [DllImport("kernel32")] public static extern void LeaveCriticalSection(ref CRITICAL_SECTION lpCriticalSection);
    1245.         [DllImport("kernel32")] public static extern void RaiseException(int dwExceptionCode, int dwExceptionFlags, int nNumberOfArguments, ref int lpArguments);
    1246.         [DllImport("kernel32")] public static extern void SetFileApisToANSI();
    1247.         [DllImport("kernel32")] public static extern void SetFileApisToOEM();
    1248.         [DllImport("kernel32")] public static extern void SetLastError(int dwErrCode);
    1249.         [DllImport("kernel32")] public static extern void Sleep(int dwMilliseconds);
    1250.         [DllImport("kernel32")] public static extern int GetComputerNameW(IntPtr lpBuffer, int nSize);
    1251.         [DllImport("kernel32")] public static extern int GetProcAddress(HANDLE hModule, string lpProcName);

    复制代码


    发帖求助前要善用论坛搜索功能,那里可能会有你要找的答案;

    如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子分类或者标题加上【已解决】

    如何回报帮助你解决问题的坛友,可以以【悬赏】的方式提问,伸手党遭人唾弃,做一个热心并受欢迎的人!

  • TA的每日心情
    奋斗
    2018-11-2 10:21
  • 签到天数: 21 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    10

    主题

    27

    帖子

    227

    积分

    Rank: 7Rank: 7Rank: 7

    积分
    227

    优质会员

     楼主| 发表于 2018-4-27 16:53:28 | 显示全部楼层
    接上面的Kernel.cs
    1. public const int ACCESS_ALLOWED_ACE_TYPE = 0x0;
    2. public const int ACCESS_DENIED_ACE_TYPE = 0x1;
    3. public const int ACCESS_SYSTEM_SECURITY = 0x1000000;
    4. public const int ACL_REVISION = (2);
    5. public const int ACL_REVISION1 = (1);
    6. public const int ACL_REVISION2 = (2);
    7. public const int AC_LINE_BACKUP_POWER = 0x2;
    8. public const int AC_LINE_OFFLINE = 0x0;
    9. public const int AC_LINE_ONLINE = 0x1;
    10. public const int AC_LINE_UNKNOWN = 0xFF;
    11. public const int APPLICATION_ERROR_MASK = 0x20000000;
    12. public const int AclRevisionInformation = 1;
    13. public const int AclSizeInformation = 2;
    14. public const int BACKGROUND_BLUE = 0x10;
    15. public const int BACKGROUND_GREEN = 0x20;
    16. public const int BACKGROUND_INTENSITY = 0x80;
    17. public const int BACKGROUND_RED = 0x40;
    18. public const int BACKUP_ALTERNATE_DATA = 0x4;
    19. public const int BACKUP_DATA = 0x1;
    20. public const int BACKUP_EA_DATA = 0x2;
    21. public const int BACKUP_LINK = 0x5;
    22. public const int BACKUP_SECURITY_DATA = 0x3;
    23. public const int BATTERY_FLAG_CHARGING = 0x8;
    24. public const int BATTERY_FLAG_CRITICAL = 0x4;
    25. public const int BATTERY_FLAG_HIGH = 0x1;
    26. public const int BATTERY_FLAG_LOW = 0x2;
    27. public const int BATTERY_FLAG_NO_BATTERY = 0x80;
    28. public const int BATTERY_FLAG_UNKNOWN = 0xFF;
    29. public const int BATTERY_LIFE_UNKNOWN = 0xFFFF;
    30. public const int BATTERY_PERCENTAGE_UNKNOWN = 0xFF;
    31. public const int BAUD_075 = 0x1;
    32. public const int BAUD_110 = 0x2;
    33. public const int BAUD_115200 = 0x20000;
    34. public const int BAUD_1200 = 0x40;
    35. public const int BAUD_128K = 0x10000;
    36. public const int BAUD_134_5 = 0x4;
    37. public const int BAUD_14400 = 0x1000;
    38. public const int BAUD_150 = 0x8;
    39. public const int BAUD_1800 = 0x80;
    40. public const int BAUD_19200 = 0x2000;
    41. public const int BAUD_2400 = 0x100;
    42. public const int BAUD_300 = 0x10;
    43. public const int BAUD_38400 = 0x4000;
    44. public const int BAUD_4800 = 0x200;
    45. public const int BAUD_56K = 0x8000;
    46. public const int BAUD_57600 = 0x40000;
    47. public const int BAUD_600 = 0x20;
    48. public const int BAUD_7200 = 0x400;
    49. public const int BAUD_9600 = 0x800;
    50. public const int BAUD_USER = 0x10000000;
    51. public const int C1_ALPHA = 0x100;
    52. public const int C1_BLANK = 0x40;
    53. public const int C1_CNTRL = 0x20;
    54. public const int C1_DIGIT = 0x4;
    55. public const int C1_LOWER = 0x2;
    56. public const int C1_PUNCT = 0x10;
    57. public const int C1_SPACE = 0x8;
    58. public const int C1_UPPER = 0x1;
    59. public const int C1_XDIGIT = 0x80;
    60. public const int C2_ARABICNUMBER = 0x6;
    61. public const int C2_BLOCKSEPARATOR = 0x8;
    62. public const int C2_COMMONSEPARATOR = 0x7;
    63. public const int C2_EUROPENUMBER = 0x3;
    64. public const int C2_EUROPESEPARATOR = 0x4;
    65. public const int C2_EUROPETERMINATOR = 0x5;
    66. public const int C2_LEFTTORIGHT = 0x1;
    67. public const int C2_NOTAPPLICABLE = 0x0;
    68. public const int C2_OTHERNEUTRAL = 0xB;
    69. public const int C2_RIGHTTOLEFT = 0x2;
    70. public const int C2_SEGMENTSEPARATOR = 0x9;
    71. public const int C2_WHITESPACE = 0xA;
    72. public const int C3_DIACRITIC = 0x2;
    73. public const int C3_NONSPACING = 0x1;
    74. public const int C3_NOTAPPLICABLE = 0x0;
    75. public const int C3_SYMBOL = 0x8;
    76. public const int C3_VOWELMARK = 0x4;
    77. public const int CAL_GREGORIAN = 1;
    78. public const int CAL_GREGORIAN_US = 2;
    79. public const int CAL_ICALINTVALUE = 0x1;
    80. public const int CAL_IYEAROFFSETRANGE = 0x3;
    81. public const int CAL_JAPAN = 3;
    82. public const int CAL_KOREA = 5;
    83. public const int CAL_SABBREVDAYNAME1 = 0xE;
    84. public const int CAL_SABBREVDAYNAME2 = 0xF;
    85. public const int CAL_SABBREVDAYNAME3 = 0x10;
    86. public const int CAL_SABBREVDAYNAME4 = 0x11;
    87. public const int CAL_SABBREVDAYNAME5 = 0x12;
    88. public const int CAL_SABBREVDAYNAME6 = 0x13;
    89. public const int CAL_SABBREVDAYNAME7 = 0x14;
    90. public const int CAL_SABBREVMONTHNAME1 = 0x22;
    91. public const int CAL_SABBREVMONTHNAME10 = 0x2B;
    92. public const int CAL_SABBREVMONTHNAME11 = 0x2C;
    93. public const int CAL_SABBREVMONTHNAME12 = 0x2D;
    94. public const int CAL_SABBREVMONTHNAME13 = 0x2E;
    95. public const int CAL_SABBREVMONTHNAME2 = 0x23;
    96. public const int CAL_SABBREVMONTHNAME3 = 0x24;
    97. public const int CAL_SABBREVMONTHNAME4 = 0x25;
    98. public const int CAL_SABBREVMONTHNAME5 = 0x26;
    99. public const int CAL_SABBREVMONTHNAME6 = 0x27;
    100. public const int CAL_SABBREVMONTHNAME7 = 0x28;
    101. public const int CAL_SABBREVMONTHNAME8 = 0x29;
    102. public const int CAL_SABBREVMONTHNAME9 = 0x2A;
    103. public const int CAL_SCALNAME = 0x2;
    104. public const int CAL_SDAYNAME1 = 0x7;
    105. public const int CAL_SDAYNAME2 = 0x8;
    106. public const int CAL_SDAYNAME3 = 0x9;
    107. public const int CAL_SDAYNAME4 = 0xA;
    108. public const int CAL_SDAYNAME5 = 0xB;
    109. public const int CAL_SDAYNAME6 = 0xC;
    110. public const int CAL_SDAYNAME7 = 0xD;
    111. public const int CAL_SERASTRING = 0x4;
    112. public const int CAL_SLONGDATE = 0x6;
    113. public const int CAL_SMONTHNAME1 = 0x15;
    114. public const int CAL_SMONTHNAME10 = 0x1E;
    115. public const int CAL_SMONTHNAME11 = 0x1F;
    116. public const int CAL_SMONTHNAME12 = 0x20;
    117. public const int CAL_SMONTHNAME13 = 0x21;
    118. public const int CAL_SMONTHNAME2 = 0x16;
    119. public const int CAL_SMONTHNAME3 = 0x17;
    120. public const int CAL_SMONTHNAME4 = 0x18;
    121. public const int CAL_SMONTHNAME5 = 0x19;
    122. public const int CAL_SMONTHNAME6 = 0x1A;
    123. public const int CAL_SMONTHNAME7 = 0x1B;
    124. public const int CAL_SMONTHNAME8 = 0x1C;
    125. public const int CAL_SMONTHNAME9 = 0x1D;
    126. public const int CAL_SSHORTDATE = 0x5;
    127. public const int CAL_TAIWAN = 4;
    128. public const int CAPSLOCK_ON = 0x80;
    129. public const int CBR_110 = 110;
    130. public const int CBR_115200 = 115200;
    131. public const int CBR_1200 = 1200;
    132. public const int CBR_128000 = 128000;
    133. public const int CBR_14400 = 14400;
    134. public const int CBR_19200 = 19200;
    135. public const int CBR_2400 = 2400;
    136. public const int CBR_256000 = 256000;
    137. public const int CBR_300 = 300;
    138. public const int CBR_38400 = 38400;
    139. public const int CBR_4800 = 4800;
    140. public const int CBR_56000 = 56000;
    141. public const int CBR_57600 = 57600;
    142. public const int CBR_600 = 600;
    143. public const int CBR_9600 = 9600;
    144. public const int CE_BREAK = 0x10;
    145. public const int CE_DNS = 0x800;
    146. public const int CE_FRAME = 0x8;
    147. public const int CE_IOE = 0x400;
    148. public const int CE_MODE = 0x8000;
    149. public const int CE_OOP = 0x1000;
    150. public const int CE_OVERRUN = 0x2;
    151. public const int CE_PTO = 0x200;
    152. public const int CE_RXOVER = 0x1;
    153. public const int CE_RXPARITY = 0x4;
    154. public const int CE_TXFULL = 0x100;
    155. public const int CLRBREAK = 9;
    156. public const int CLRDTR = 6;
    157. public const int CLRRTS = 4;
    158. public const int CONSOLE_TEXTMODE_BUFFER = 1;
    159. public const int CONTAINER_INHERIT_ACE = 0x2;
    160. public const int CP_ACP = 0;
    161. public const int CP_OEMCP = 1;
    162. public const int CREATE_ALWAYS = 2;
    163. public const int CREATE_NEW = 1;
    164. public const int CREATE_NEW_CONSOLE = 0x10;
    165. public const int CREATE_NEW_PROCESS_GROUP = 0x200;
    166. public const int CREATE_NO_WINDOW = 0x8000000;
    167. public const int CREATE_PROCESS_DEBUG_EVENT = 3;
    168. public const int CREATE_SUSPENDED = 0x4;
    169. public const int CREATE_THREAD_DEBUG_EVENT = 2;
    170. public const int CTRL_BREAK_EVENT = 1;
    171. public const int CTRL_CLOSE_EVENT = 2;
    172. public const int CTRL_C_EVENT = 0;
    173. public const int CTRL_LOGOFF_EVENT = 5;
    174. public const int CTRL_SHUTDOWN_EVENT = 6;
    175. public const int CTRY_AUSTRALIA = 61;
    176. public const int CTRY_AUSTRIA = 43;
    177. public const int CTRY_BELGIUM = 32;
    178. public const int CTRY_BRAZIL = 55;
    179. public const int CTRY_CANADA = 2;
    180. public const int CTRY_DEFAULT = 0;
    181. public const int CTRY_DENMARK = 45;
    182. public const int CTRY_FINLAND = 358;
    183. public const int CTRY_FRANCE = 33;
    184. public const int CTRY_GERMANY = 49;
    185. public const int CTRY_ICELAND = 354;
    186. public const int CTRY_IRELAND = 353;
    187. public const int CTRY_ITALY = 39;
    188. public const int CTRY_JAPAN = 81;
    189. public const int CTRY_MEXICO = 52;
    190. public const int CTRY_NETHERLANDS = 31;
    191. public const int CTRY_NEW_ZEALAND = 64;
    192. public const int CTRY_NORWAY = 47;
    193. public const int CTRY_PORTUGAL = 351;
    194. public const int CTRY_PRCHINA = 86;
    195. public const int CTRY_SOUTH_KOREA = 82;
    196. public const int CTRY_SPAIN = 34;
    197. public const int CTRY_SWEDEN = 46;
    198. public const int CTRY_SWITZERLAND = 41;
    199. public const int CTRY_TAIWAN = 886;
    200. public const int CTRY_UNITED_KINGDOM = 44;
    201. public const int CTRY_UNITED_STATES = 1;
    202. public const int CT_CTYPE1 = 0x1;
    203. public const int CT_CTYPE2 = 0x2;
    204. public const int CT_CTYPE3 = 0x4;
    205. public const int DATABITS_16 = 0x10;
    206. public const int DATABITS_16X = 0x20;
    207. public const int DATABITS_5 = 0x1;
    208. public const int DATABITS_6 = 0x2;
    209. public const int DATABITS_7 = 0x4;
    210. public const int DATABITS_8 = 0x8;
    211. public const int DATE_LONGDATE = 0x2;
    212. public const int DATE_SHORTDATE = 0x1;
    213. public const int DDD_EXACT_MATCH_ON_REMOVE = 0x4;
    214. public const int DDD_RAW_TARGET_PATH = 0x1;
    215. public const int DDD_REMOVE_DEFINITION = 0x2;
    216. public const int DEBUG_ONLY_THIS_PROCESS = 0x2;
    217. public const int DEBUG_PROCESS = 0x1;
    218. public const int DELETE = 0x10000;
    219. public const int DETACHED_PROCESS = 0x8;
    220. public const int DFCS_ADJUSTRECT = 0x2000;
    221. public const int DFCS_BUTTON3STATE = 0x8;
    222. public const int DFCS_BUTTONCHECK = 0x0;
    223. public const int DFCS_BUTTONPUSH = 0x10;
    224. public const int DFCS_BUTTONRADIO = 0x4;
    225. public const int DFCS_BUTTONRADIOIMAGE = 0x1;
    226. public const int DFCS_BUTTONRADIOMASK = 0x2;
    227. public const int DFCS_CAPTIONCLOSE = 0x0;
    228. public const int DFCS_CAPTIONHELP = 0x4;
    229. public const int DFCS_CAPTIONMAX = 0x2;
    230. public const int DFCS_CAPTIONMIN = 0x1;
    231. public const int DFCS_CAPTIONRESTORE = 0x3;
    232. public const int DFCS_CHECKED = 0x400;
    233. public const int DFCS_FLAT = 0x4000;
    234. public const int DFCS_INACTIVE = 0x100;
    235. public const int DFCS_MENUARROW = 0x0;
    236. public const int DFCS_MENUARROWRIGHT = 0x4;
    237. public const int DFCS_MENUBULLET = 0x2;
    238. public const int DFCS_MENUCHECK = 0x1;
    239. public const int DFCS_MONO = 0x8000;
    240. public const int DFCS_PUSHED = 0x200;
    241. public const int DFCS_SCROLLCOMBOBOX = 0x5;
    242. public const int DFCS_SCROLLDOWN = 0x1;
    243. public const int DFCS_SCROLLLEFT = 0x2;
    244. public const int DFCS_SCROLLRIGHT = 0x3;
    245. public const int DFCS_SCROLLSIZEGRIP = 0x8;
    246. public const int DFCS_SCROLLSIZEGRIPRIGHT = 0x10;
    247. public const int DFCS_SCROLLUP = 0x0;
    248. public const int DFC_BUTTON = 4;
    249. public const int DFC_CAPTION = 1;
    250. public const int DFC_MENU = 2;
    251. public const int DFC_SCROLL = 3;
    252. public const int DOMAIN_ALIAS_RID_ACCOUNT_OPS = 0x224;
    253. public const int DOMAIN_ALIAS_RID_ADMINS = 0x220;
    254. public const int DOMAIN_ALIAS_RID_BACKUP_OPS = 0x227;
    255. public const int DOMAIN_ALIAS_RID_GUESTS = 0x222;
    256. public const int DOMAIN_ALIAS_RID_POWER_USERS = 0x223;
    257. public const int DOMAIN_ALIAS_RID_PRINT_OPS = 0x226;
    258. public const int DOMAIN_ALIAS_RID_REPLICATOR = 0x228;
    259. public const int DOMAIN_ALIAS_RID_SYSTEM_OPS = 0x225;
    260. public const int DOMAIN_ALIAS_RID_USERS = 0x221;
    261. public const int DOMAIN_GROUP_RID_ADMINS = 0x200;
    262. public const int DOMAIN_GROUP_RID_GUESTS = 0x202;
    263. public const int DOMAIN_GROUP_RID_USERS = 0x201;
    264. public const int DOMAIN_USER_RID_ADMIN = 0x1F4;
    265. public const int DOMAIN_USER_RID_GUEST = 0x1F5;
    266. public const int DONT_RESOLVE_DLL_REFERENCES = 0x1;
    267. public const int DOUBLE_CLICK = 0x2;
    268. public const int DRIVE_CDROM = 5;
    269. public const int DRIVE_FIXED = 3;
    270. public const int DRIVE_RAMDISK = 6;
    271. public const int DRIVE_REMOTE = 4;
    272. public const int DRIVE_REMOVABLE = 2;
    273. public const int DTR_CONTROL_DISABLE = 0x0;
    274. public const int DTR_CONTROL_ENABLE = 0x1;
    275. public const int DTR_CONTROL_HANDSHAKE = 0x2;
    276. public const int DUPLICATE_CLOSE_SOURCE = 0x1;
    277. public const int DUPLICATE_SAME_ACCESS = 0x2;
    278. public const int ENABLE_ECHO_INPUT = 0x4;
    279. public const int ENABLE_LINE_INPUT = 0x2;
    280. public const int ENABLE_MOUSE_INPUT = 0x10;
    281. public const int ENABLE_PROCESSED_INPUT = 0x1;
    282. public const int ENABLE_PROCESSED_OUTPUT = 0x1;
    283. public const int ENABLE_WINDOW_INPUT = 0x8;
    284. public const int ENABLE_WRAP_AT_EOL_OUTPUT = 0x2;
    285. public const int ENHANCED_KEY = 0x100;
    286. public const int ENUM_ALL_CALENDARS = 0xFFFF;
    287. public const int ERROR_SEVERITY_ERROR = unchecked((int)0xC0000000);
    288. public const int ERROR_SEVERITY_INFORMATIONAL = 0x40000000;
    289. public const int ERROR_SEVERITY_SUCCESS = 0x0;
    290. public const int ERROR_SEVERITY_WARNING = unchecked((int)0x80000000);
    291. public const int EVENPARITY = 2;
    292. public const int EV_BREAK = 0x40;
    293. public const int EV_CTS = 0x8;
    294. public const int EV_DSR = 0x10;
    295. public const int EV_ERR = 0x80;
    296. public const int EV_EVENT1 = 0x800;
    297. public const int EV_EVENT2 = 0x1000;
    298. public const int EV_PERR = 0x200;
    299. public const int EV_RING = 0x100;
    300. public const int EV_RLSD = 0x20;
    301. public const int EV_RX80FULL = 0x400;
    302. public const int EV_RXCHAR = 0x1;
    303. public const int EV_RXFLAG = 0x2;
    304. public const int EV_TXEMPTY = 0x4;
    305. public const int EXCEPTION_CONTINUE_EXECUTION = -1;
    306. public const int EXCEPTION_CONTINUE_SEARCH = 0;
    307. public const int EXCEPTION_DEBUG_EVENT = 1;
    308. public const int EXCEPTION_EXECUTE_HANDLER = 1;
    309. public const int EXCEPTION_MAXIMUM_PARAMETERS = 15;
    310. public const int EXIT_PROCESS_DEBUG_EVENT = 5;
    311. public const int EXIT_THREAD_DEBUG_EVENT = 4;
    312. public const int FAILED_ACCESS_ACE_FLAG = 0x80;
    313. public const int FILE_ADD_FILE = (0x2);
    314. public const int FILE_ADD_SUBDIRECTORY = (0x4);
    315. public const int FILE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF);
    316. public const int FILE_APPEND_DATA = (0x4);
    317. public const int FILE_ATTRIBUTE_ARCHIVE = 0x20;
    318. public const int FILE_ATTRIBUTE_COMPRESSED = 0x800;
    319. public const int FILE_ATTRIBUTE_DIRECTORY = 0x10;
    320. public const int FILE_ATTRIBUTE_HIDDEN = 0x2;
    321. public const int FILE_ATTRIBUTE_NORMAL = 0x80;
    322. public const int FILE_ATTRIBUTE_READONLY = 0x1;
    323. public const int FILE_ATTRIBUTE_SYSTEM = 0x4;
    324. public const int FILE_ATTRIBUTE_TEMPORARY = 0x100;
    325. public const int FILE_BEGIN = 0;
    326. public const int FILE_CASE_PRESERVED_NAMES = 0x2;
    327. public const int FILE_CASE_SENSITIVE_SEARCH = 0x1;
    328. public const int FILE_CREATE_PIPE_INSTANCE = (0x4);
    329. public const int FILE_CURRENT = 1;
    330. public const int FILE_DELETE_CHILD = (0x40);
    331. public const int FILE_END = 2;
    332. public const int FILE_EXECUTE = (0x20);
    333. public const int FILE_FILE_COMPRESSION = 0x10;
    334. public const int FILE_FLAG_BACKUP_SEMANTICS = 0x2000000;
    335. public const int FILE_FLAG_DELETE_ON_CLOSE = 0x4000000;
    336. public const int FILE_FLAG_NO_BUFFERING = 0x20000000;
    337. public const int FILE_FLAG_OVERLAPPED = 0x40000000;
    338. public const int FILE_FLAG_POSIX_SEMANTICS = 0x1000000;
    339. public const int FILE_FLAG_RANDOM_ACCESS = 0x10000000;
    340. public const int FILE_FLAG_SEQUENTIAL_SCAN = 0x8000000;
    341. public const int FILE_FLAG_WRITE_THROUGH = unchecked((int)0x80000000);
    342. public const int FILE_GENERIC_EXECUTE = (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE);
    343. public const int FILE_GENERIC_READ = (STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE);
    344. public const int FILE_GENERIC_WRITE = (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE);
    345. public const int FILE_LIST_DIRECTORY = (0x1);
    346. public const int FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS;
    347. public const int FILE_MAP_COPY = SECTION_QUERY;
    348. public const int FILE_MAP_READ = SECTION_MAP_READ;
    349. public const int FILE_MAP_WRITE = SECTION_MAP_WRITE;
    350. public const int FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x4;
    351. public const int FILE_NOTIFY_CHANGE_DIR_NAME = 0x2;
    352. public const int FILE_NOTIFY_CHANGE_FILE_NAME = 0x1;
    353. public const int FILE_NOTIFY_CHANGE_LAST_WRITE = 0x10;
    354. public const int FILE_NOTIFY_CHANGE_SECURITY = 0x100;
    355. public const int FILE_NOTIFY_CHANGE_SIZE = 0x8;
    356. public const int FILE_PERSISTENT_ACLS = 0x8;
    357. public const int FILE_READ_ATTRIBUTES = (0x80);
    358. public const int FILE_READ_DATA = (0x1);
    359. public const int FILE_READ_EA = (0x8);
    360. public const int FILE_READ_PROPERTIES = FILE_READ_EA;
    361. public const int FILE_SHARE_READ = 0x1;
    362. public const int FILE_SHARE_WRITE = 0x2;
    363. public const int FILE_TRAVERSE = (0x20);
    364. public const int FILE_TYPE_CHAR = 0x2;
    365. public const int FILE_TYPE_DISK = 0x1;
    366. public const int FILE_TYPE_PIPE = 0x3;
    367. public const int FILE_TYPE_REMOTE = 0x8000;
    368. public const int FILE_TYPE_UNKNOWN = 0x0;
    369. public const int FILE_UNICODE_ON_DISK = 0x4;
    370. public const int FILE_VOLUME_IS_COMPRESSED = 0x8000;
    371. public const int FILE_WRITE_ATTRIBUTES = (0x100);
    372. public const int FILE_WRITE_DATA = (0x2);
    373. public const int FILE_WRITE_EA = (0x10);
    374. public const int FILE_WRITE_PROPERTIES = FILE_WRITE_EA;
    375. public const int FOCUS_EVENT = 0x10;
    376. public const int FOREGROUND_BLUE = 0x1;
    377. public const int FOREGROUND_GREEN = 0x2;
    378. public const int FOREGROUND_INTENSITY = 0x8;
    379. public const int FOREGROUND_RED = 0x4;
    380. public const int FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x100;
    381. public const int FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x2000;
    382. public const int FORMAT_MESSAGE_FROM_HMODULE = 0x800;
    383. public const int FORMAT_MESSAGE_FROM_STRING = 0x400;
    384. public const int FORMAT_MESSAGE_FROM_SYSTEM = 0x1000;
    385. public const int FORMAT_MESSAGE_IGNORE_INSERTS = 0x200;
    386. public const int FORMAT_MESSAGE_MAX_WIDTH_MASK = 0xFF;
    387. public const int FROM_LEFT_1ST_BUTTON_PRESSED = 0x1;
    388. public const int FROM_LEFT_2ND_BUTTON_PRESSED = 0x4;
    389. public const int FROM_LEFT_3RD_BUTTON_PRESSED = 0x8;
    390. public const int FROM_LEFT_4TH_BUTTON_PRESSED = 0x10;
    391. public const int FS_CASE_IS_PRESERVED = FILE_CASE_PRESERVED_NAMES;
    392. public const int FS_CASE_SENSITIVE = FILE_CASE_SENSITIVE_SEARCH;
    393. public const int FS_PERSISTENT_ACLS = FILE_PERSISTENT_ACLS;
    394. public const int FS_UNICODE_STORED_ON_DISK = FILE_UNICODE_ON_DISK;
    395. public const int GENERIC_ALL = 0x10000000;
    396. public const int GENERIC_EXECUTE = 0x20000000;
    397. public const int GENERIC_READ = unchecked((int)0x80000000);
    398. public const int GENERIC_WRITE = 0x40000000;
    399. public const int GET_TAPE_DRIVE_INFORMATION = 1;
    400. public const int GET_TAPE_MEDIA_INFORMATION = 0;
    401. public const int GHND = (GMEM_MOVEABLE | GMEM_ZEROINIT);
    402. public const int GMEM_DDESHARE = 0x2000;
    403. public const int GMEM_DISCARDABLE = 0x100;
    404. public const int GMEM_DISCARDED = 0x4000;
    405. public const int GMEM_FIXED = 0x0;
    406. public const int GMEM_INVALID_HANDLE = 0x8000;
    407. public const int GMEM_LOCKCOUNT = 0xFF;
    408. public const int GMEM_LOWER = GMEM_NOT_BANKED;
    409. public const int GMEM_MODIFY = 0x80;
    410. public const int GMEM_MOVEABLE = 0x2;
    411. public const int GMEM_NOCOMPACT = 0x10;
    412. public const int GMEM_NODISCARD = 0x20;
    413. public const int GMEM_NOTIFY = 0x4000;
    414. public const int GMEM_NOT_BANKED = 0x1000;
    415. public const int GMEM_SHARE = 0x2000;
    416. public const int GMEM_VALID_FLAGS = 0x7F72;
    417. public const int GMEM_ZEROINIT = 0x40;
    418. public const int GPTR = (GMEM_FIXED | GMEM_ZEROINIT);
    419. public const int HIGH_PRIORITY_CLASS = 0x80;
    420. public const int HKEY_CLASSES_ROOT = unchecked((int)0x80000000);
    421. public const int HKEY_CURRENT_CONFIG = unchecked((int)0x80000005);
    422. public const int HKEY_CURRENT_USER = unchecked((int)0x80000001);
    423. public const int HKEY_DYN_DATA = unchecked((int)0x80000006);
    424. public const int HKEY_LOCAL_MACHINE = unchecked((int)0x80000002);
    425. public const int HKEY_PERFORMANCE_DATA = unchecked((int)0x80000004);
    426. public const int HKEY_USERS = unchecked((int)0x80000003);
    427. public const int IDLE_PRIORITY_CLASS = 0x40;
    428. public const int IE_BADID = (-1);
    429. public const int IE_BAUDRATE = (-12);
    430. public const int IE_BYTESIZE = (-11);
    431. public const int IE_DEFAULT = (-5);
    432. public const int IE_HARDWARE = (-10);
    433. public const int IE_MEMORY = (-4);
    434. public const int IE_NOPEN = (-3);
    435. public const int IE_OPEN = (-2);
    436. public const int IGNORE = 0;
    437. public const int INFINITE = 0xFFFF;
    438. public const int INHERIT_ONLY_ACE = 0x8;
    439. public const int IO_COMPLETION_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3);
    440. public const int IO_COMPLETION_MODIFY_STATE = 0x2;
    441. public const int KEY_ALL_ACCESS = ((STANDARD_RIGHTS_ALL | KEY_QUERY_VALUE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY | KEY_CREATE_LINK) & (~ SYNCHRONIZE));
    442. public const int KEY_CREATE_LINK = 0x20;
    443. public const int KEY_CREATE_SUB_KEY = 0x4;
    444. public const int KEY_ENUMERATE_SUB_KEYS = 0x8;
    445. public const int KEY_EVENT = 0x1;
    446. public const int KEY_EXECUTE = ((KEY_READ) & (~ SYNCHRONIZE));
    447. public const int KEY_NOTIFY = 0x10;
    448. public const int KEY_QUERY_VALUE = 0x1;
    449. public const int KEY_READ = ((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & (~ SYNCHRONIZE));
    450. public const int KEY_SET_VALUE = 0x2;
    451. public const int KEY_WRITE = ((STANDARD_RIGHTS_WRITE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY) & (~ SYNCHRONIZE));
    452. public const int LANG_BULGARIAN = 0x2;
    453. public const int LANG_CHINESE = 0x4;
    454. public const int LANG_CROATIAN = 0x1A;
    455. public const int LANG_CZECH = 0x5;
    456. public const int LANG_DANISH = 0x6;
    457. public const int LANG_DUTCH = 0x13;
    458. public const int LANG_ENGLISH = 0x9;
    459. public const int LANG_FINNISH = 0xB;
    460. public const int LANG_FRENCH = 0xC;
    461. public const int LANG_GERMAN = 0x7;
    462. public const int LANG_GREEK = 0x8;
    463. public const int LANG_HUNGARIAN = 0xE;
    464. public const int LANG_ICELANDIC = 0xF;
    465. public const int LANG_ITALIAN = 0x10;
    466. public const int LANG_JAPANESE = 0x11;
    467. public const int LANG_KOREAN = 0x12;
    468. public const int LANG_NEUTRAL = 0x0;
    469. public const int LANG_NORWEGIAN = 0x14;
    470. public const int LANG_POLISH = 0x15;
    471. public const int LANG_PORTUGUESE = 0x16;
    472. public const int LANG_ROMANIAN = 0x18;
    473. public const int LANG_RUSSIAN = 0x19;
    474. public const int LANG_SLOVAK = 0x1B;
    475. public const int LANG_SLOVENIAN = 0x24;
    476. public const int LANG_SPANISH = 0xA;
    477. public const int LANG_SWEDISH = 0x1D;
    478. public const int LANG_TURKISH = 0x1F;
    479. public const int LCMAP_BYTEREV = 0x800;
    480. public const int LCMAP_LOWERCASE = 0x100;
    481. public const int LCMAP_SORTKEY = 0x400;
    482. public const int LCMAP_UPPERCASE = 0x200;
    483. public const int LEFT_ALT_PRESSED = 0x2;
    484. public const int LEFT_CTRL_PRESSED = 0x8;
    485. public const int LHND = (LMEM_MOVEABLE + LMEM_ZEROINIT);
    486. public const int LMEM_DISCARDABLE = 0xF00;
    487. public const int LMEM_DISCARDED = 0x4000;
    488. public const int LMEM_FIXED = 0x0;
    489. public const int LMEM_INVALID_HANDLE = 0x8000;
    490. public const int LMEM_LOCKCOUNT = 0xFF;
    491. public const int LMEM_MODIFY = 0x80;
    492. public const int LMEM_MOVEABLE = 0x2;
    493. public const int LMEM_NOCOMPACT = 0x10;
    494. public const int LMEM_NODISCARD = 0x20;
    495. public const int LMEM_VALID_FLAGS = 0xF72;
    496. public const int LMEM_ZEROINIT = 0x40;
    497. public const int LNOTIFY_DISCARD = 2;
    498. public const int LNOTIFY_MOVE = 1;
    499. public const int LNOTIFY_OUTOFMEM = 0;
    500. public const int LOAD_DLL_DEBUG_EVENT = 6;
    501. public const int LOCALE_ICENTURY = 0x24;
    502. public const int LOCALE_ICOUNTRY = 0x5;
    503. public const int LOCALE_ICURRDIGITS = 0x19;
    504. public const int LOCALE_ICURRENCY = 0x1B;
    505. public const int LOCALE_IDATE = 0x21;
    506. public const int LOCALE_IDAYLZERO = 0x26;
    507. public const int LOCALE_IDEFAULTCODEPAGE = 0xB;
    508. public const int LOCALE_IDEFAULTCOUNTRY = 0xA;
    509. public const int LOCALE_IDEFAULTLANGUAGE = 0x9;
    510. public const int LOCALE_IDIGITS = 0x11;
    511. public const int LOCALE_IINTLCURRDIGITS = 0x1A;
    512. public const int LOCALE_ILANGUAGE = 0x1;
    513. public const int LOCALE_ILDATE = 0x22;
    514. public const int LOCALE_ILZERO = 0x12;
    515. public const int LOCALE_IMEASURE = 0xD;
    516. public const int LOCALE_IMONLZERO = 0x27;
    517. public const int LOCALE_INEGCURR = 0x1C;
    518. public const int LOCALE_INEGSEPBYSPACE = 0x57;
    519. public const int LOCALE_INEGSIGNPOSN = 0x53;
    520. public const int LOCALE_INEGSYMPRECEDES = 0x56;
    521. public const int LOCALE_IPOSSEPBYSPACE = 0x55;
    522. public const int LOCALE_IPOSSIGNPOSN = 0x52;
    523. public const int LOCALE_IPOSSYMPRECEDES = 0x54;
    524. public const int LOCALE_ITIME = 0x23;
    525. public const int LOCALE_ITLZERO = 0x25;
    526. public const int LOCALE_NOUSEROVERRIDE = unchecked((int) 0x80000000);
    527. public const int LOCALE_S1159 = 0x28;
    528. public const int LOCALE_S2359 = 0x29;
    529. public const int LOCALE_SABBREVCTRYNAME = 0x7;
    530. public const int LOCALE_SABBREVDAYNAME1 = 0x31;
    531. public const int LOCALE_SABBREVDAYNAME2 = 0x32;
    532. public const int LOCALE_SABBREVDAYNAME3 = 0x33;
    533. public const int LOCALE_SABBREVDAYNAME4 = 0x34;
    534. public const int LOCALE_SABBREVDAYNAME5 = 0x35;
    535. public const int LOCALE_SABBREVDAYNAME6 = 0x36;
    536. public const int LOCALE_SABBREVDAYNAME7 = 0x37;
    537. public const int LOCALE_SABBREVLANGNAME = 0x3;
    538. public const int LOCALE_SABBREVMONTHNAME1 = 0x44;
    539. public const int LOCALE_SABBREVMONTHNAME10 = 0x4D;
    540. public const int LOCALE_SABBREVMONTHNAME11 = 0x4E;
    541. public const int LOCALE_SABBREVMONTHNAME12 = 0x4F;
    542. public const int LOCALE_SABBREVMONTHNAME13 = 0x100F;
    543. public const int LOCALE_SABBREVMONTHNAME2 = 0x45;
    544. public const int LOCALE_SABBREVMONTHNAME3 = 0x46;
    545. public const int LOCALE_SABBREVMONTHNAME4 = 0x47;
    546. public const int LOCALE_SABBREVMONTHNAME5 = 0x48;
    547. public const int LOCALE_SABBREVMONTHNAME6 = 0x49;
    548. public const int LOCALE_SABBREVMONTHNAME7 = 0x4A;
    549. public const int LOCALE_SABBREVMONTHNAME8 = 0x4B;
    550. public const int LOCALE_SABBREVMONTHNAME9 = 0x4C;
    551. public const int LOCALE_SCOUNTRY = 0x6;
    552. public const int LOCALE_SCURRENCY = 0x14;
    553. public const int LOCALE_SDATE = 0x1D;
    554. public const int LOCALE_SDAYNAME1 = 0x2A;
    555. public const int LOCALE_SDAYNAME2 = 0x2B;
    556. public const int LOCALE_SDAYNAME3 = 0x2C;
    557. public const int LOCALE_SDAYNAME4 = 0x2D;
    558. public const int LOCALE_SDAYNAME5 = 0x2E;
    559. public const int LOCALE_SDAYNAME6 = 0x2F;
    560. public const int LOCALE_SDAYNAME7 = 0x30;
    561. public const int LOCALE_SDECIMAL = 0xE;
    562. public const int LOCALE_SENGCOUNTRY = 0x1002;
    563. public const int LOCALE_SENGLANGUAGE = 0x1001;
    564. public const int LOCALE_SGROUPING = 0x10;
    565. public const int LOCALE_SINTLSYMBOL = 0x15;
    566. public const int LOCALE_SLANGUAGE = 0x2;
    567. public const int LOCALE_SLIST = 0xC;
    568. public const int LOCALE_SLONGDATE = 0x20;
    569. public const int LOCALE_SMONDECIMALSEP = 0x16;
    570. public const int LOCALE_SMONGROUPING = 0x18;
    571. public const int LOCALE_SMONTHNAME1 = 0x38;
    572. public const int LOCALE_SMONTHNAME10 = 0x41;
    573. public const int LOCALE_SMONTHNAME11 = 0x42;
    574. public const int LOCALE_SMONTHNAME12 = 0x43;
    575. public const int LOCALE_SMONTHNAME2 = 0x39;
    576. public const int LOCALE_SMONTHNAME3 = 0x3A;
    577. public const int LOCALE_SMONTHNAME4 = 0x3B;
    578. public const int LOCALE_SMONTHNAME5 = 0x3C;
    579. public const int LOCALE_SMONTHNAME6 = 0x3D;
    580. public const int LOCALE_SMONTHNAME7 = 0x3E;
    581. public const int LOCALE_SMONTHNAME8 = 0x3F;
    582. public const int LOCALE_SMONTHNAME9 = 0x40;
    583. public const int LOCALE_SMONTHOUSANDSEP = 0x17;
    584. public const int LOCALE_SNATIVECTRYNAME = 0x8;
    585. public const int LOCALE_SNATIVEDIGITS = 0x13;
    586. public const int LOCALE_SNATIVELANGNAME = 0x4;
    587. public const int LOCALE_SNEGATIVESIGN = 0x51;
    588. public const int LOCALE_SPOSITIVESIGN = 0x50;
    589. public const int LOCALE_SSHORTDATE = 0x1F;
    590. public const int LOCALE_STHOUSAND = 0xF;
    591. public const int LOCALE_STIME = 0x1E;
    592. public const int LOCALE_STIMEFORMAT = 0x1003;
    593. public const int LOCKFILE_EXCLUSIVE_LOCK = 0x2;
    594. public const int LOCKFILE_FAIL_IMMEDIATELY = 0x1;
    595. public const int LOGON32_LOGON_BATCH = 4;
    596. public const int LOGON32_LOGON_INTERACTIVE = 2;
    597. public const int LOGON32_LOGON_SERVICE = 5;
    598. public const int LOGON32_PROVIDER_DEFAULT = 0;
    599. public const int LOGON32_PROVIDER_WINNT35 = 1;
    600. public const int LPTR = (LMEM_FIXED + LMEM_ZEROINIT);
    601. public const int LPTx = 0x80;
    602. public const int MAILSLOT_NO_MESSAGE = (-1);
    603. public const int MAILSLOT_WAIT_FOREVER = (-1);
    604. public const int MAP_COMPOSITE = 0x40;
    605. public const int MAP_FOLDCZONE = 0x10;
    606. public const int MAP_FOLDDIGITS = 0x80;
    607. public const int MAP_PRECOMPOSED = 0x20;
    608. public const int MARKPARITY = 3;
    609. public const int MAXByte = 0xFF;
    610. public const int MAXCHAR = 0x7F;
    611. public const int MAXDWORD = unchecked((int)0xFFFFFFFF);
    612. public const int MAXIMUM_ALLOWED = 0x2000000;
    613. public const int MAXLONG = 0x7FFFFFFF;
    614. public const int MAXSHORT = 0x7FFF;
    615. public const int MAXWORD = 0xFFFF;
    616. public const int MAX_DEFAULTCHAR = 2;
    617. public const int MAX_LEADBYTES = 12;
    618. public const int MAX_PATH = 260;
    619. public const int MB_COMPOSITE = 0x2;
    620. public const int MB_PRECOMPOSED = 0x1;
    621. public const int MB_USEGLYPHCHARS = 0x4;
    622. public const int MENU_EVENT = 0x8;
    623. public const int MINCHAR = 0x80;
    624. public const int MINLONG = unchecked((int)0x80000000);
    625. public const int MINSHORT = 0x8000;
    626. public const int MOUSE_MOVED = 0x1;
    627. public const int MOVEFILE_COPY_ALLOWED = 0x2;
    628. public const int MOVEFILE_DELAY_UNTIL_REBOOT = 0x4;
    629. public const int MOVEFILE_REPLACE_EXISTING = 0x1;
    630. public const int MS_CTS_ON = 0x10;
    631. public const int MS_DSR_ON = 0x20;
    632. public const int MS_RING_ON = 0x40;
    633. public const int MS_RLSD_ON = 0x80;
    634. public const int NMPWAIT_NOWAIT = 0x1;
    635. public const int NMPWAIT_USE_DEFAULT_WAIT = 0x0;
    636. public const int NMPWAIT_WAIT_FOREVER = 0xFFFF;
    637. public const int NONZEROLHND = (LMEM_MOVEABLE);
    638. public const int NONZEROLPTR = (LMEM_FIXED);
    639. public const int NOPARITY = 0;
    640. public const int NORMAL_PRIORITY_CLASS = 0x20;
    641. public const int NORM_IGNORECASE = 0x1;
    642. public const int NORM_IGNORENONSPACE = 0x2;
    643. public const int NORM_IGNORESYMBOLS = 0x4;
    644. public const int NO_PROPAGATE_INHERIT_ACE = 0x4;
    645. public const int NUMLOCK_ON = 0x20;
    646. public const int OBJECT_INHERIT_ACE = 0x1;
    647. public const int ODDPARITY = 1;
    648. public const int OFS_MAXPATHNAME = 128;
    649. public const int OF_CANCEL = 0x800;
    650. public const int OF_CREATE = 0x1000;
    651. public const int OF_DELETE = 0x200;
    652. public const int OF_EXIST = 0x4000;
    653. public const int OF_PARSE = 0x100;
    654. public const int OF_PROMPT = 0x2000;
    655. public const int OF_READ = 0x0;
    656. public const int OF_READWRITE = 0x2;
    657. public const int OF_REOPEN = 0x8000;
    658. public const int OF_SHARE_COMPAT = 0x0;
    659. public const int OF_SHARE_DENY_NONE = 0x40;
    660. public const int OF_SHARE_DENY_READ = 0x30;
    661. public const int OF_SHARE_DENY_WRITE = 0x20;
    662. public const int OF_SHARE_EXCLUSIVE = 0x10;
    663. public const int OF_VERIFY = 0x400;
    664. public const int OF_WRITE = 0x1;
    665. public const int ONE5STOPBITS = 1;
    666. public const int ONESTOPBIT = 0;
    667. public const int OPEN_ALWAYS = 4;
    668. public const int OPEN_EXISTING = 3;
    669. public const int OUTPUT_DEBUG_STRING_EVENT = 8;
    670. public const int PARITY_EVEN = 0x400;
    671. public const int PARITY_MARK = 0x800;
    672. public const int PARITY_NONE = 0x100;
    673. public const int PARITY_ODD = 0x200;
    674. public const int PARITY_SPACE = 0x1000;
    675. public const int PCF_16BITMODE = 0x200;
    676. public const int PCF_DTRDSR = 0x1;
    677. public const int PCF_INTTIMEOUTS = 0x80;
    678. public const int PCF_PARITY_CHECK = 0x8;
    679. public const int PCF_RLSD = 0x4;
    680. public const int PCF_RTSCTS = 0x2;
    681. public const int PCF_SETXCHAR = 0x20;
    682. public const int PCF_SPECIALCHARS = 0x100;
    683. public const int PCF_TOTALTIMEOUTS = 0x40;
    684. public const int PCF_XONXOFF = 0x10;
    685. public const int PERF_100NSEC_MULTI_TIMER = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_DELTA_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_MULTI_COUNTER | PERF_DISPLAY_PERCENT);
    686. public const int PERF_100NSEC_MULTI_TIMER_INV = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_DELTA_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_MULTI_COUNTER | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT);
    687. public const int PERF_100NSEC_TIMER = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT);
    688. public const int PERF_100NSEC_TIMER_INV = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT);
    689. public const int PERF_AVERAGE_BASE = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x2);
    690. public const int PERF_AVERAGE_BULK = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_NOSHOW);
    691. public const int PERF_AVERAGE_TIMER = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_SECONDS);
    692. public const int PERF_COUNTER_BASE = 0x30000;
    693. public const int PERF_COUNTER_BULK_COUNT = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PER_SEC);
    694. public const int PERF_COUNTER_COUNTER = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PER_SEC);
    695. public const int PERF_COUNTER_ELAPSED = 0x40000;
    696. public const int PERF_COUNTER_FRACTION = 0x20000;
    697. public const int PERF_COUNTER_HISTOGRAM = 0x60000;
    698. public const int PERF_COUNTER_HISTOGRAM_TYPE = unchecked((int)0x80000000);
    699. public const int PERF_COUNTER_MULTI_BASE = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_MULTI_COUNTER | PERF_DISPLAY_NOSHOW);
    700. public const int PERF_COUNTER_MULTI_TIMER = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_DELTA_COUNTER | PERF_TIMER_TICK | PERF_MULTI_COUNTER | PERF_DISPLAY_PERCENT);
    701. public const int PERF_COUNTER_MULTI_TIMER_INV = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_DELTA_COUNTER | PERF_MULTI_COUNTER | PERF_TIMER_TICK | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT);
    702. public const int PERF_COUNTER_NODATA = (PERF_SIZE_ZERO | PERF_DISPLAY_NOSHOW);
    703. public const int PERF_COUNTER_QUEUELEN = 0x50000;
    704. public const int PERF_COUNTER_QUEUELEN_TYPE = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_QUEUELEN | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX);
    705. public const int PERF_COUNTER_RATE = 0x10000;
    706. public const int PERF_COUNTER_RAWCOUNT = (PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL | PERF_DISPLAY_NO_SUFFIX);
    707. public const int PERF_COUNTER_TEXT = (PERF_SIZE_VARIABLE_LEN | PERF_TYPE_TEXT | PERF_TEXT_UNICODE | PERF_DISPLAY_NO_SUFFIX);
    708. public const int PERF_COUNTER_TIMER = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT);
    709. public const int PERF_COUNTER_TIMER_INV = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT);
    710. public const int PERF_COUNTER_VALUE = 0x0;
    711. public const int PERF_DATA_REVISION = 1;
    712. public const int PERF_DATA_VERSION = 1;
    713. public const int PERF_DELTA_BASE = 0x800000;
    714. public const int PERF_DELTA_COUNTER = 0x400000;
    715. public const int PERF_DETAIL_ADVANCED = 200;
    716. public const int PERF_DETAIL_EXPERT = 300;
    717. public const int PERF_DETAIL_NOVICE = 100;
    718. public const int PERF_DETAIL_WIZARD = 400;
    719. public const int PERF_DISPLAY_NOSHOW = 0x40000000;
    720. public const int PERF_DISPLAY_NO_SUFFIX = 0x0;
    721. public const int PERF_DISPLAY_PERCENT = 0x20000000;
    722. public const int PERF_DISPLAY_PER_SEC = 0x10000000;
    723. public const int PERF_DISPLAY_SECONDS = 0x30000000;
    724. public const int PERF_ELAPSED_TIME = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_ELAPSED | PERF_OBJECT_TIMER | PERF_DISPLAY_SECONDS);
    725. public const int PERF_INVERSE_COUNTER = 0x1000000;
    726. public const int PERF_MULTI_COUNTER = 0x2000000;
    727. public const int PERF_NO_INSTANCES = -1;
    728. public const int PERF_NO_UNIQUE_ID = -1;
    729. public const int PERF_NUMBER_DECIMAL = 0x10000;
    730. public const int PERF_NUMBER_DEC_1000 = 0x20000;
    731. public const int PERF_NUMBER_HEX = 0x0;
    732. public const int PERF_OBJECT_TIMER = 0x200000;
    733. public const int PERF_RAW_BASE = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x3);
    734. public const int PERF_RAW_FRACTION = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_PERCENT);
    735. public const int PERF_SAMPLE_BASE = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x1);
    736. public const int PERF_SAMPLE_COUNTER = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX);
    737. public const int PERF_SAMPLE_FRACTION = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DELTA_COUNTER | PERF_DELTA_BASE | PERF_DISPLAY_PERCENT);
    738. public const int PERF_SIZE_DWORD = 0x0;
    739. public const int PERF_SIZE_LARGE = 0x100;
    740. public const int PERF_SIZE_VARIABLE_LEN = 0x300;
    741. public const int PERF_SIZE_ZERO = 0x200;
    742. public const int PERF_TEXT_ASCII = 0x10000;
    743. public const int PERF_TEXT_UNICODE = 0x0;
    744. public const int PERF_TIMER_100NS = 0x100000;
    745. public const int PERF_TIMER_TICK = 0x0;
    746. public const int PERF_TYPE_COUNTER = 0x400;
    747. public const int PERF_TYPE_NUMBER = 0x0;
    748. public const int PERF_TYPE_TEXT = 0x800;
    749. public const int PERF_TYPE_ZERO = 0xC00;
    750. public const int PIPE_ACCESS_DUPLEX = 0x3;
    751. public const int PIPE_ACCESS_INBOUND = 0x1;
    752. public const int PIPE_ACCESS_OUTBOUND = 0x2;
    753. public const int PIPE_CLIENT_END = 0x0;
    754. public const int PIPE_NOWAIT = 0x1;
    755. public const int PIPE_READMODE_BYTE = 0x0;
    756. public const int PIPE_READMODE_MESSAGE = 0x2;
    757. public const int PIPE_SERVER_END = 0x1;
    758. public const int PIPE_TYPE_BYTE = 0x0;
    759. public const int PIPE_TYPE_MESSAGE = 0x4;
    760. public const int PIPE_UNLIMITED_INSTANCES = 255;
    761. public const int PIPE_WAIT = 0x0;
    762. public const int PRIVILEGE_SET_ALL_NECESSARY = (1);
    763. public const int PROCESSOR_ALPHA_21064 = 21064;
    764. public const int PROCESSOR_ARCHITECTURE_ALPHA = 2;
    765. public const int PROCESSOR_ARCHITECTURE_INTEL = 0;
    766. public const int PROCESSOR_ARCHITECTURE_MIPS = 1;
    767. public const int PROCESSOR_ARCHITECTURE_PPC = 3;
    768. public const int PROCESSOR_ARCHITECTURE_UNKNOWN = 0xFFFF;
    769. public const int PROCESSOR_INTEL_386 = 386;
    770. public const int PROCESSOR_INTEL_486 = 486;
    771. public const int PROCESSOR_INTEL_PENTIUM = 586;
    772. public const int PROCESSOR_MIPS_R4000 = 4000;
    773. public const int PROCESS_HEAP_ENTRY_BUSY = 0x4;
    774. public const int PROCESS_HEAP_ENTRY_DDESHARE = 0x20;
    775. public const int PROCESS_HEAP_ENTRY_MOVEABLE = 0x10;
    776. public const int PROCESS_HEAP_REGION = 0x1;
    777. public const int PROCESS_HEAP_UNCOMMITTED_RANGE = 0x2;
    778. public const int PROFILE_KERNEL = 0x20000000;
    779. public const int PROFILE_SERVER = 0x40000000;
    780. public const int PROFILE_USER = 0x10000000;
    781. public const int PST_FAX = 0x21;
    782. public const int PST_LAT = 0x101;
    783. public const int PST_NETWORK_BRIDGE = 0x100;
    784. public const int PST_PARALLELPORT = 0x2;
    785. public const int PST_RS232 = 0x1;
    786. public const int PST_RS422 = 0x3;
    787. public const int PST_RS423 = 0x4;
    788. public const int PST_RS449 = 0x5;
    789. public const int PST_SCANNER = 0x22;
    790. public const int PST_TCPIP_TELNET = 0x102;
    791. public const int PST_UNSPECIFIED = 0x0;
    792. public const int PST_X25 = 0x103;
    793. public const int PURGE_RXABORT = 0x2;
    794. public const int PURGE_RXCLEAR = 0x8;
    795. public const int PURGE_TXABORT = 0x1;
    796. public const int PURGE_TXCLEAR = 0x4;
    797. public const int READ_CONTROL = 0x20000;
    798. public const int REALTIME_PRIORITY_CLASS = 0x100;
    799. public const int REG_BINARY = 3;
    800. public const int REG_CREATED_NEW_KEY = 0x1;
    801. public const int REG_DWORD = 4;
    802. public const int REG_DWORD_BIG_ENDIAN = 5;
    803. public const int REG_DWORD_LITTLE_ENDIAN = 4;
    804. public const int REG_EXPAND_SZ = 2;
    805. public const int REG_FULL_RESOURCE_DESCRIPTOR = 9;
    806. public const int REG_LEGAL_CHANGE_FILTER = (REG_NOTIFY_CHANGE_NAME | REG_NOTIFY_CHANGE_ATTRIBUTES | REG_NOTIFY_CHANGE_LAST_SET | REG_NOTIFY_CHANGE_SECURITY);
    807. public const int REG_LEGAL_OPTION = (REG_OPTION_RESERVED | REG_OPTION_NON_VOLATILE | REG_OPTION_VOLATILE | REG_OPTION_CREATE_LINK | REG_OPTION_BACKUP_RESTORE);
    808. public const int REG_LINK = 6;
    809. public const int REG_MULTI_SZ = 7;
    810. public const int REG_NONE = 0;
    811. public const int REG_NOTIFY_CHANGE_ATTRIBUTES = 0x2;
    812. public const int REG_NOTIFY_CHANGE_LAST_SET = 0x4;
    813. public const int REG_NOTIFY_CHANGE_NAME = 0x1;
    814. public const int REG_NOTIFY_CHANGE_SECURITY = 0x8;
    815. public const int REG_OPENED_EXISTING_KEY = 0x2;
    816. public const int REG_OPTION_BACKUP_RESTORE = 4;
    817. public const int REG_OPTION_CREATE_LINK = 2;
    818. public const int REG_OPTION_NON_VOLATILE = 0;
    819. public const int REG_OPTION_RESERVED = 0;
    820. public const int REG_OPTION_VOLATILE = 1;
    821. public const int REG_REFRESH_HIVE = 0x2;
    822. public const int REG_RESOURCE_LIST = 8;
    823. public const int REG_RESOURCE_REQUIREMENTS_LIST = 10;
    824. public const int REG_SZ = 1;
    825. public const int REG_WHOLE_HIVE_VOLATILE = 0x1;
    826. public const int RESETDEV = 7;
    827. public const int RIGHTMOST_BUTTON_PRESSED = 0x2;
    828. public const int RIGHT_ALT_PRESSED = 0x1;
    829. public const int RIGHT_CTRL_PRESSED = 0x4;
    830. public const int RIP_EVENT = 9;
    831. public const int RTS_CONTROL_DISABLE = 0x0;
    832. public const int RTS_CONTROL_ENABLE = 0x1;
    833. public const int RTS_CONTROL_HANDSHAKE = 0x2;
    834. public const int RTS_CONTROL_TOGGLE = 0x3;
    835. public const int RT_ACCELERATOR = 9;
    836. public const int RT_BITMAP = 2;
    837. public const int RT_CURSOR = 1;
    838. public const int RT_DIALOG = 5;
    839. public const int RT_FONT = 8;
    840. public const int RT_FONTDIR = 7;
    841. public const int RT_ICON = 3;
    842. public const int RT_MENU = 4;
    843. public const int RT_RCDATA = 10;
    844. public const int RT_STRING = 6;
    845. public const int SCROLLLOCK_ON = 0x40;
    846. public const int SCS_32BIT_BINARY = 0;
    847. public const int SCS_DOS_BINARY = 1;
    848. public const int SCS_OS216_BINARY = 5;
    849. public const int SCS_PIF_BINARY = 3;
    850. public const int SCS_POSIX_BINARY = 4;
    851. public const int SCS_WOW_BINARY = 2;
    852. public const int SC_MANAGER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | SC_MANAGER_CONNECT | SC_MANAGER_CREATE_SERVICE | SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_LOCK | SC_MANAGER_QUERY_LOCK_STATUS | SC_MANAGER_MODIFY_BOOT_CONFIG);
    853. public const int SC_MANAGER_CONNECT = 0x1;
    854. public const int SC_MANAGER_CREATE_SERVICE = 0x2;
    855. public const int SC_MANAGER_ENUMERATE_SERVICE = 0x4;
    856. public const int SC_MANAGER_LOCK = 0x8;
    857. public const int SC_MANAGER_MODIFY_BOOT_CONFIG = 0x20;
    858. public const int SC_MANAGER_QUERY_LOCK_STATUS = 0x10;
    859. public const int SECTION_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_WRITE | SECTION_MAP_READ | SECTION_MAP_EXECUTE | SECTION_EXTEND_SIZE;
    860. public const int SECTION_EXTEND_SIZE = 0x10;
    861. public const int SECTION_MAP_EXECUTE = 0x8;
    862. public const int SECTION_MAP_READ = 0x4;
    863. public const int SECTION_MAP_WRITE = 0x2;
    864. public const int SECTION_QUERY = 0x1;
    865. public const int SECURITY_ANONYMOUS_LOGON_RID = 0x7;
    866. public const int SECURITY_BATCH_RID = 0x3;
    867. public const int SECURITY_BUILTIN_DOMAIN_RID = 0x20;
    868. public const int SECURITY_CONTEXT_TRACKING = 0x40000;
    869. public const int SECURITY_CREATOR_GROUP_RID = 0x1;
    870. public const int SECURITY_CREATOR_OWNER_RID = 0x0;
    871. public const int SECURITY_DESCRIPTOR_MIN_LENGTH = (20);
    872. public const int SECURITY_DESCRIPTOR_REVISION = (1);
    873. public const int SECURITY_DESCRIPTOR_REVISION1 = (1);
    874. public const int SECURITY_DIALUP_RID = 0x1;
    875. public const int SECURITY_EFFECTIVE_ONLY = 0x80000;
    876. public const int SECURITY_INTERACTIVE_RID = 0x4;
    877. public const int SECURITY_LOCAL_RID = 0x0;
    878. public const int SECURITY_LOCAL_SYSTEM_RID = 0x12;
    879. public const int SECURITY_LOGON_IDS_RID = 0x5;
    880. public const int SECURITY_NETWORK_RID = 0x2;
    881. public const int SECURITY_NT_NON_UNIQUE = 0x15;
    882. public const int SECURITY_NULL_RID = 0x0;
    883. public const int SECURITY_SERVICE_RID = 0x6;
    884. public const int SECURITY_SQOS_PRESENT = 0x100000;
    885. public const int SECURITY_VALID_SQOS_FLAGS = 0x1F0000;
    886. public const int SECURITY_WORLD_RID = 0x0;
    887. public const int SEM_FAILCRITICALERRORS = 0x1;
    888. public const int SEM_NOGPFAULTERRORBOX = 0x2;
    889. public const int SEM_NOOPENFILEERRORBOX = 0x8000;
    890. public const int SERVICE_ACCEPT_PAUSE_CONTINUE = 0x2;
    891. public const int SERVICE_ACCEPT_SHUTDOWN = 0x4;
    892. public const int SERVICE_ACCEPT_STOP = 0x1;
    893. public const int SERVICE_ACTIVE = 0x1;
    894. public const int SERVICE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL);
    895. public const int SERVICE_CHANGE_CONFIG = 0x2;
    896. public const int SERVICE_CONTINUE_PENDING = 0x5;
    897. public const int SERVICE_CONTROL_CONTINUE = 0x3;
    898. public const int SERVICE_CONTROL_INTERROGATE = 0x4;
    899. public const int SERVICE_CONTROL_PAUSE = 0x2;
    900. public const int SERVICE_CONTROL_SHUTDOWN = 0x5;
    901. public const int SERVICE_CONTROL_STOP = 0x1;
    902. public const int SERVICE_ENUMERATE_DEPENDENTS = 0x8;
    903. public const int SERVICE_INACTIVE = 0x2;
    904. public const int SERVICE_INTERROGATE = 0x80;
    905. public const int SERVICE_NO_CHANGE = 0xFFFF;
    906. public const int SERVICE_PAUSED = 0x7;
    907. public const int SERVICE_PAUSE_CONTINUE = 0x40;
    908. public const int SERVICE_PAUSE_PENDING = 0x6;
    909. public const int SERVICE_QUERY_CONFIG = 0x1;
    910. public const int SERVICE_QUERY_STATUS = 0x4;
    911. public const int SERVICE_RUNNING = 0x4;
    912. public const int SERVICE_START = 0x10;
    913. public const int SERVICE_START_PENDING = 0x2;
    914. public const int SERVICE_STATE_ALL = (SERVICE_ACTIVE | SERVICE_INACTIVE);
    915. public const int SERVICE_STOP = 0x20;
    916. public const int SERVICE_STOPPED = 0x1;
    917. public const int SERVICE_STOP_PENDING = 0x3;
    918. public const int SERVICE_USER_DEFINED_CONTROL = 0x100;
    919. public const int SETBREAK = 8;
    920. public const int SETDTR = 5;
    921. public const int SETRTS = 3;
    922. public const int SETXOFF = 1;
    923. public const int SETXON = 2;
    924. public const int SET_TAPE_DRIVE_INFORMATION = 1;
    925. public const int SET_TAPE_MEDIA_INFORMATION = 0;
    926. public const int SE_DACL_DEFAULTED = 0x8;
    927. public const int SE_DACL_PRESENT = 0x4;
    928. public const int SE_GROUP_DEFAULTED = 0x2;
    929. public const int SE_GROUP_ENABLED = 0x4;
    930. public const int SE_GROUP_ENABLED_BY_DEFAULT = 0x2;
    931. public const int SE_GROUP_LOGON_ID = unchecked((int)0xC0000000);
    932. public const int SE_GROUP_MANDATORY = 0x1;
    933. public const int SE_GROUP_OWNER = 0x8;
    934. public const int SE_OWNER_DEFAULTED = 0x1;
    935. public const int SE_PRIVILEGE_ENABLED = 0x2;
    936. public const int SE_PRIVILEGE_ENABLED_BY_DEFAULT = 0x1;
    937. public const int SE_PRIVILEGE_USED_FOR_ACCESS = unchecked((int)0x80000000);
    938. public const int SE_SACL_DEFAULTED = 0x20;
    939. public const int SE_SACL_PRESENT = 0x10;
    940. public const int SE_SELF_RELATIVE = 0x8000;
    941. public const int SHIFT_PRESSED = 0x10;
    942. public const int SHUTDOWN_NORETRY = 0x1;
    943. public const int SID_MAX_SUB_AUTHORITIES = (15);
    944. public const int SID_RECOMMENDED_SUB_AUTHORITIES = (1);
    945. public const int SID_REVISION = (1);
    946. public const int SLE_ERROR = 0x1;
    947. public const int SLE_MINORERROR = 0x2;
    948. public const int SLE_WARNING = 0x3;
    949. public const int SORT_CHINESE_BIG5 = 0x0;
    950. public const int SORT_CHINESE_UNICODE = 0x1;
    951. public const int SORT_DEFAULT = 0x0;
    952. public const int SORT_JAPANESE_UNICODE = 0x1;
    953. public const int SORT_JAPANESE_XJIS = 0x0;
    954. public const int SORT_KOREAN_KSC = 0x0;
    955. public const int SORT_KOREAN_UNICODE = 0x1;
    956. public const int SORT_STRINGSORT = 0x1000;
    957. public const int SPACEPARITY = 4;
    958. public const int SPECIFIC_RIGHTS_ALL = 0xFFFF;
    959. public const int SP_BAUD = 0x2;
    960. public const int SP_DATABITS = 0x4;
    961. public const int SP_HANDSHAKING = 0x10;
    962. public const int SP_PARITY = 0x1;
    963. public const int SP_PARITY_CHECK = 0x20;
    964. public const int SP_RLSD = 0x40;
    965. public const int SP_SERIALCOMM = 0x1;
    966. public const int SP_STOPBITS = 0x8;
    967. public const int STANDARD_RIGHTS_ALL = 0x1F0000;
    968. public const int STANDARD_RIGHTS_EXECUTE = (READ_CONTROL);
    969. public const int STANDARD_RIGHTS_READ = (READ_CONTROL);
    970. public const int STANDARD_RIGHTS_REQUIRED = 0xF0000;
    971. public const int STANDARD_RIGHTS_WRITE = (READ_CONTROL);
    972. public const int STARTF_FORCEOFFFEEDBACK = 0x80;
    973. public const int STARTF_FORCEONFEEDBACK = 0x40;
    974. public const int STARTF_RUNFULLSCREEN = 0x20;
    975. public const int STARTF_USECOUNTCHARS = 0x8;
    976. public const int STARTF_USEFILLATTRIBUTE = 0x10;
    977. public const int STARTF_USEPOSITION = 0x4;
    978. public const int STARTF_USESHOWWINDOW = 0x1;
    979. public const int STARTF_USESIZE = 0x2;
    980. public const int STARTF_USESTDHANDLES = 0x100;
    981. public const int STD_ERROR_HANDLE = -12;
    982. public const int STD_INPUT_HANDLE = -10;
    983. public const int STD_OUTPUT_HANDLE = -11;
    984. public const int STOPBITS_10 = 0x1;
    985. public const int STOPBITS_15 = 0x2;
    986. public const int STOPBITS_20 = 0x4;
    987. public const int STREAM_CONTAINS_SECURITY = 0x2;
    988. public const int STREAM_MODIFIED_WHEN_READ = 0x1;
    989. public const int SUBLANG_CHINESE_HONGKONG = 0x3;
    990. public const int SUBLANG_CHINESE_SIMPLIFIED = 0x2;
    991. public const int SUBLANG_CHINESE_SINGAPORE = 0x4;
    992. public const int SUBLANG_CHINESE_TRADITIONAL = 0x1;
    993. public const int SUBLANG_DEFAULT = 0x1;
    994. public const int SUBLANG_DUTCH = 0x1;
    995. public const int SUBLANG_DUTCH_BELGIAN = 0x2;
    996. public const int SUBLANG_ENGLISH_AUS = 0x3;
    997. public const int SUBLANG_ENGLISH_CAN = 0x4;
    998. public const int SUBLANG_ENGLISH_EIRE = 0x6;
    999. public const int SUBLANG_ENGLISH_NZ = 0x5;
    1000. public const int SUBLANG_ENGLISH_UK = 0x2;
    1001. public const int SUBLANG_ENGLISH_US = 0x1;
    1002. public const int SUBLANG_FRENCH = 0x1;
    1003. public const int SUBLANG_FRENCH_BELGIAN = 0x2;
    1004. public const int SUBLANG_FRENCH_CANADIAN = 0x3;
    1005. public const int SUBLANG_FRENCH_SWISS = 0x4;
    1006. public const int SUBLANG_GERMAN = 0x1;
    1007. public const int SUBLANG_GERMAN_AUSTRIAN = 0x3;
    1008. public const int SUBLANG_GERMAN_SWISS = 0x2;
    1009. public const int SUBLANG_ITALIAN = 0x1;
    1010. public const int SUBLANG_ITALIAN_SWISS = 0x2;
    1011. public const int SUBLANG_NEUTRAL = 0x0;
    1012. public const int SUBLANG_NORWEGIAN_BOKMAL = 0x1;
    1013. public const int SUBLANG_NORWEGIAN_NYNORSK = 0x2;
    1014. public const int SUBLANG_PORTUGUESE = 0x2;
    1015. public const int SUBLANG_PORTUGUESE_BRAZILIAN = 0x1;
    1016. public const int SUBLANG_SPANISH = 0x1;
    1017. public const int SUBLANG_SPANISH_MEXICAN = 0x2;
    1018. public const int SUBLANG_SPANISH_MODERN = 0x3;
    1019. public const int SUBLANG_SYS_DEFAULT = 0x2;
    1020. public const int SUCCESSFUL_ACCESS_ACE_FLAG = 0x40;
    1021. public const int SYNCHRONIZE = 0x100000;
    1022. public const int SYSTEM_ALARM_ACE_TYPE = 0x3;
    1023. public const int SYSTEM_AUDIT_ACE_TYPE = 0x2;
    1024. public const int S_ALLTHRESHOLD = 2;
    1025. public const int S_LEGATO = 1;
    1026. public const int S_NORMAL = 0;
    1027. public const int S_PERIOD1024 = 1;
    1028. public const int S_PERIOD2048 = 2;
    1029. public const int S_PERIOD512 = 0;
    1030. public const int S_PERIODVOICE = 3;
    1031. public const int S_QUEUEEMPTY = 0;
    1032. public const int S_SERBDNT = (-5);
    1033. public const int S_SERDCC = (-7);
    1034. public const int S_SERDDR = (-14);
    1035. public const int S_SERDFQ = (-13);
    1036. public const int S_SERDLN = (-6);
    1037. public const int S_SERDMD = (-10);
    1038. public const int S_SERDPT = (-12);
    1039. public const int S_SERDSH = (-11);
    1040. public const int S_SERDSR = (-15);
    1041. public const int S_SERDST = (-16);
    1042. public const int S_SERDTP = (-8);
    1043. public const int S_SERDVL = (-9);
    1044. public const int S_SERDVNA = (-1);
    1045. public const int S_SERMACT = (-3);
    1046. public const int S_SEROFM = (-2);
    1047. public const int S_SERQFUL = (-4);
    1048. public const int S_STACCATO = 2;
    1049. public const int S_THRESHOLD = 1;
    1050. public const int S_WHITE1024 = 5;
    1051. public const int S_WHITE2048 = 6;
    1052. public const int S_WHITE512 = 4;
    1053. public const int S_WHITEVOICE = 7;
    1054. public const int SecurityAnonymous = 1;
    1055. public const int SecurityIdentification = 2;
    1056. public const int SidTypeAlias = 4;
    1057. public const int SidTypeDeletedAccount = 6;
    1058. public const int SidTypeDomain = 3;
    1059. public const int SidTypeGroup = 2;
    1060. public const int SidTypeInvalid = 7;
    1061. public const int SidTypeUnknown = 8;
    1062. public const int SidTypeUser = 1;
    1063. public const int SidTypeWellKnownGroup = 5;
    1064. public const int TC_GP_TRAP = 2;
    1065. public const int TC_HARDERR = 1;
    1066. public const int TC_NORMAL = 0;
    1067. public const int TC_SIGNAL = 3;
    1068. public const int TF_FORCEDRIVE = 0x80;
    1069. public const int THREAD_BASE_PRIORITY_IDLE = -15;
    1070. public const int THREAD_BASE_PRIORITY_LOWRT = 15;
    1071. public const int THREAD_BASE_PRIORITY_MAX = 2;
    1072. public const int THREAD_BASE_PRIORITY_MIN = -2;
    1073. public const int THREAD_PRIORITY_ABOVE_NORMAL = (THREAD_PRIORITY_HIGHEST - 1);
    1074. public const int THREAD_PRIORITY_BELOW_NORMAL = (THREAD_PRIORITY_LOWEST + 1);
    1075. public const int THREAD_PRIORITY_ERROR_RETURN = (MAXLONG);
    1076. public const int THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX;
    1077. public const int THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE;
    1078. public const int THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN;
    1079. public const int THREAD_PRIORITY_NORMAL = 0;
    1080. public const int THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT;
    1081. public const int TIME_FORCE24HOURFORMAT = 0x8;
    1082. public const int TIME_NOMINUTESORSECONDS = 0x1;
    1083. public const int TIME_NOSECONDS = 0x2;
    1084. public const int TIME_NOTIMEMARKER = 0x4;
    1085. public const int TLS_OUT_OF_INDEXES = 0xFFFF;
    1086. public const int TRUNCATE_EXISTING = 5;
    1087. public const int TWOSTOPBITS = 2;
    1088. public const int TokenDefaultDacl = 6;
    1089. public const int TokenGroups = 2;
    1090. public const int TokenImpersonationLevel = 9;
    1091. public const int TokenOwner = 4;
    1092. public const int TokenPrimaryGroup = 5;
    1093. public const int TokenPrivileges = 3;
    1094. public const int TokenSource = 7;
    1095. public const int TokenStatistics = 10;
    1096. public const int TokenType = 8;
    1097. public const int TokenUser = 1;
    1098. public const int UNLOAD_DLL_DEBUG_EVENT = 7;
    1099. public const int VALID_INHERIT_FLAGS = 0xF;
    1100. public const int VER_PLATFORM_WIN32_NT = 2;
    1101. public const int VER_PLATFORM_WIN32_WINDOWS = 1;
    1102. public const int VER_PLATFORM_WIN32s = 0;
    1103. public const int WC_COMPOSITECHECK = 0x200;
    1104. public const int WC_DEFAULTCHAR = 0x40;
    1105. public const int WC_DEFAULTCHECK = 0x100;
    1106. public const int WC_DISCARDNS = 0x10;
    1107. public const int WC_SEPCHARS = 0x20;
    1108. public const int WINDOW_BUFFER_SIZE_EVENT = 0x4;
    1109. public const int WRITE_DAC = 0x40000;
    1110. public const int WRITE_OWNER = 0x80000;
    1111. public const int mouse_eventC = 0x2;
    1112. public const string SC_GROUP_IDENTIFIER = "+";
    1113. public const string SERVICES_ACTIVE_DATABASE = "ServicesActive";
    1114. public const string SERVICES_FAILED_DATABASE = "ServicesFailed";
    1115. public const string SE_ASSIGNPRIMARYTOKEN_NAME = "SeAssignPrimaryTokenPrivilege";
    1116. public const string SE_AUDIT_NAME = "SeAuditPrivilege";
    1117. public const string SE_BACKUP_NAME = "SeBackupPrivilege";
    1118. public const string SE_CHANGE_NOTIFY_NAME = "SeChangeNotifyPrivilege";
    1119. public const string SE_CREATE_PAGEFILE_NAME = "SeCreatePagefilePrivilege";
    1120. public const string SE_CREATE_PERMANENT_NAME = "SeCreatePermanentPrivilege";
    1121. public const string SE_CREATE_TOKEN_NAME = "SeCreateTokenPrivilege";
    1122. public const string SE_DEBUG_NAME = "SeDebugPrivilege";
    1123. public const string SE_INCREASE_QUOTA_NAME = "SeIncreaseQuotaPrivilege";
    1124. public const string SE_INC_BASE_PRIORITY_NAME = "SeIncreaseBasePriorityPrivilege";
    1125. public const string SE_LOAD_DRIVER_NAME = "SeLoadDriverPrivilege";
    1126. public const string SE_LOCK_MEMORY_NAME = "SeLockMemoryPrivilege";
    1127. public const string SE_MACHINE_ACCOUNT_NAME = "SeMachineAccountPrivilege";
    1128. public const string SE_PROF_SINGLE_PROCESS_NAME = "SeProfileSingleProcessPrivilege";
    1129. public const string SE_REMOTE_SHUTDOWN_NAME = "SeRemoteShutdownPrivilege";
    1130. public const string SE_RESTORE_NAME = "SeRestorePrivilege";
    1131. public const string SE_SECURITY_NAME = "SeSecurityPrivilege";
    1132. public const string SE_SHUTDOWN_NAME = "SeShutdownPrivilege";
    1133. public const string SE_SYSTEMTIME_NAME = "SeSystemtimePrivilege";
    1134. public const string SE_SYSTEM_ENVIRONMENT_NAME = "SeSystemEnvironmentPrivilege";
    1135. public const string SE_SYSTEM_PROFILE_NAME = "SeSystemProfilePrivilege";
    1136. public const string SE_TAKE_OWNERSHIP_NAME = "SeTakeOwnershipPrivilege";
    1137. public const string SE_TCB_NAME = "SeTcbPrivilege";
    1138. public const string SE_UNSOLICITED_INPUT_NAME = "SeUnsolicitedInputPrivilege";
    1139. }
    1140. }
    复制代码


    发帖求助前要善用论坛搜索功能,那里可能会有你要找的答案;

    如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子分类或者标题加上【已解决】

    如何回报帮助你解决问题的坛友,可以以【悬赏】的方式提问,伸手党遭人唾弃,做一个热心并受欢迎的人!

  • TA的每日心情
    奋斗
    2018-11-2 10:21
  • 签到天数: 21 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    10

    主题

    27

    帖子

    227

    积分

    Rank: 7Rank: 7Rank: 7

    积分
    227

    优质会员

     楼主| 发表于 2018-4-27 16:54:53 | 显示全部楼层
    User.cs
    1. using System;
    2. using System.Runtime.InteropServices;
    3. using System.Text;

    4. using HANDLE = System.IntPtr;
    5. using HWND = System.IntPtr;
    6. using HDC = System.IntPtr;

    7. namespace Win32
    8. {
    9.     public struct CBTACTIVATESTRUCT
    10.     {
    11.         public int fMouse;
    12.         public HWND hwndActive;
    13.     }
    14.     public struct EVENTMSG
    15.     {
    16.         public int message;
    17.         public int paramL;
    18.         public int paramH;
    19.         public int time;
    20.         public HWND hwnd;
    21.     }
    22.     public struct CWPSTRUCT
    23.     {
    24.         public int lParam;
    25.         public int wParam;
    26.         public int message;
    27.         public HWND hwnd;
    28.     }
    29.     public struct DEBUGHOOKINFO
    30.     {
    31.         public HANDLE hModuleHook;
    32.         public int Reserved;
    33.         public int lParam;
    34.         public int wParam;
    35.         public int code;
    36.     }
    37.     public struct MOUSEHOOKSTRUCT
    38.     {
    39.         public POINT pt;
    40.         public HWND hwnd;
    41.         public int wHitTestCode;
    42.         public int dwExtraInfo;
    43.     }
    44.     public struct MINMAXINFO
    45.     {
    46.         public POINT ptReserved;
    47.         public POINT ptMaxSize;
    48.         public POINT ptMaxPosition;
    49.         public POINT ptMinTrackSize;
    50.         public POINT ptMaxTrackSize;
    51.     }
    52.     public struct COPYDATASTRUCT
    53.     {
    54.         public int dwData;
    55.         public int cbData;
    56.         public int lpData;
    57.     }
    58.     public struct WINDOWPOS
    59.     {
    60.         public HWND hwnd;
    61.         public HWND hwndInsertAfter;
    62.         public int x;
    63.         public int y;
    64.         public int cx;
    65.         public int cy;
    66.         public int flags;
    67.     }
    68.     public struct ACCEL
    69.     {
    70.         public byte fVirt;
    71.         public short key;
    72.         public short cmd;
    73.     }
    74.     public struct PAINTSTRUCT
    75.     {
    76.         public HDC hdc;
    77.         public int fErase;
    78.         public RECT rcPaint;
    79.         public int fRestore;
    80.         public int fIncUpdate;
    81.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=32)] public byte rgbReserved;
    82.     }
    83.     public struct CREATESTRUCT
    84.     {
    85.         public int lpCreateParams;
    86.         public HANDLE hInstance;
    87.         public HANDLE hMenu;
    88.         public HWND hwndParent;
    89.         public int cy;
    90.         public int cx;
    91.         public int y;
    92.         public int x;
    93.         public int style;
    94.         public string lpszName;
    95.         public string lpszClass;
    96.         public int ExStyle;
    97.     }
    98.     public struct CBT_CREATEWND
    99.     {
    100.         public CREATESTRUCT lpcs;
    101.         public HWND hwndInsertAfter;
    102.     }
    103.     public struct WINDOWPLACEMENT
    104.     {
    105.         public int Length;
    106.         public int flags;
    107.         public int showCmd;
    108.         public POINT ptMinPosition;
    109.         public POINT ptMaxPosition;
    110.         public RECT rcNormalPosition;
    111.     }
    112.     public struct MEASUREITEMSTRUCT
    113.     {
    114.         public int CtlType;
    115.         public int CtlID;
    116.         public int itemID;
    117.         public int itemWidth;
    118.         public int itemHeight;
    119.         public int itemData;
    120.     }
    121.     public struct DRAWITEMSTRUCT
    122.     {
    123.         public int CtlType;
    124.         public int CtlID;
    125.         public int itemID;
    126.         public int itemAction;
    127.         public int itemState;
    128.         public HWND hwndItem;
    129.         public HDC hdc;
    130.         public RECT rcItem;
    131.         public int itemData;
    132.     }
    133.     public struct DELETEITEMSTRUCT
    134.     {
    135.         public int CtlType;
    136.         public int CtlID;
    137.         public int itemID;
    138.         public HWND hwndItem;
    139.         public int itemData;
    140.     }
    141.     public struct COMPAREITEMSTRUCT
    142.     {
    143.         public int CtlType;
    144.         public int CtlID;
    145.         public HWND hwndItem;
    146.         public int itemID1;
    147.         public int itemData1;
    148.         public int itemID2;
    149.         public int itemData2;
    150.     }
    151.     public struct MSG
    152.     {
    153.         public HWND hwnd;
    154.         public int message;
    155.         public int wParam;
    156.         public int lParam;
    157.         public int time;
    158.         public POINT pt;
    159.     }
    160.     public struct WNDCLASS
    161.     {
    162.         public int style;
    163.         public int lpfnwndproc;
    164.         public int cbClsextra;
    165.         public int cbWndExtra2;
    166.         public HANDLE hInstance;
    167.         public HANDLE hIcon;
    168.         public HANDLE hCursor;
    169.         public HANDLE hbrBackground;
    170.         public string lpszMenuName;
    171.         public string lpszClassName;
    172.     }
    173.     public struct DLGTEMPLATE
    174.     {
    175.         public int style;
    176.         public int dwExtendedStyle;
    177.         public short cdit;
    178.         public short x;
    179.         public short y;
    180.         public short cx;
    181.         public short cy;
    182.     }
    183.     public struct DLGITEMTEMPLATE
    184.     {
    185.         public int style;
    186.         public int dwExtendedStyle;
    187.         public short x;
    188.         public short y;
    189.         public short cx;
    190.         public short cy;
    191.         public short id;
    192.     }
    193.     public struct MENUITEMTEMPLATEHEADER
    194.     {
    195.         public short versionNumber;
    196.         public short offset;
    197.     }
    198.     public struct MENUITEMTEMPLATE
    199.     {
    200.         public short mtOption;
    201.         public short mtID;
    202.         public byte mtString;
    203.     }
    204.     public struct ICONINFO
    205.     {
    206.         public int fIcon;
    207.         public int xHotspot;
    208.         public int yHotspot;
    209.         public HANDLE hbmMask;
    210.         public HANDLE hbmColor;
    211.     }
    212.     public struct MDICREATESTRUCT
    213.     {
    214.         public string szClass;
    215.         public string szTitle;
    216.         public HWND hOwner;
    217.         public int x;
    218.         public int y;
    219.         public int cx;
    220.         public int cy;
    221.         public int style;
    222.         public int lParam;
    223.     }
    224.     public struct CLIENTCREATESTRUCT
    225.     {
    226.         public HANDLE hWindowMenu;
    227.         public int idFirstChild;
    228.     }
    229.     public struct MULTIKEYHELP
    230.     {
    231.         public int mkSize;
    232.         public byte mkKeylist;
    233.         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=253)] public string szKeyphrase;
    234.     }
    235.     public struct HELPWININFO
    236.     {
    237.         public int wStructSize;
    238.         public int x;
    239.         public int y;
    240.         public int dx;
    241.         public int dy;
    242.         public int wMax;
    243.         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=2)] public string rgchMember;
    244.     }
    245.     public struct DDEACK
    246.     {
    247.         public short bAppReturnCode;
    248.         public short Reserved;
    249.         public short fbusy;
    250.         public short fack;
    251.     }
    252.     public struct DDEADVISE
    253.     {
    254.         public short Reserved;
    255.         public short fDeferUpd;
    256.         public short fAckReq;
    257.         public short cfFormat;
    258.     }
    259.     public struct DDEDATA
    260.     {
    261.         public short unused;
    262.         public short fresponse;
    263.         public short fRelease;
    264.         public short Reserved;
    265.         public short fAckReq;
    266.         public short cfFormat;
    267.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public byte Value;
    268.     }
    269.     public struct DDEPOKE
    270.     {
    271.         public short unused;
    272.         public short fRelease;
    273.         public short fReserved;
    274.         public short cfFormat;
    275.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public byte Value;
    276.     }
    277.     public struct DDELN
    278.     {
    279.         public short unused;
    280.         public short fRelease;
    281.         public short fDeferUpd;
    282.         public short fAckReq;
    283.         public short cfFormat;
    284.     }
    285.     public struct DDEUP
    286.     {
    287.         public short unused;
    288.         public short fAck;
    289.         public short fRelease;
    290.         public short fReserved;
    291.         public short fAckReq;
    292.         public short cfFormat;
    293.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public byte rgb;
    294.     }
    295.     public struct HSZPAIR
    296.     {
    297.         public HANDLE hszSvc;
    298.         public HANDLE hszTopic;
    299.     }
    300.     public struct SECURITY_QUALITY_OF_SERVICE
    301.     {
    302.         public int Length;
    303.         public short Impersonationlevel;
    304.         public short ContextTrackingMode;
    305.         public int EffectiveOnly;
    306.     }
    307.     public struct CONVCONTEXT
    308.     {
    309.         public int cb;
    310.         public int wFlags;
    311.         public int wCountryID;
    312.         public int iCodePage;
    313.         public int dwLangID;
    314.         public int dwSecurity;
    315.         public SECURITY_QUALITY_OF_SERVICE qos;
    316.     }
    317.     public struct CONVINFO
    318.     {
    319.         public int cb;
    320.         public HANDLE hUser;
    321.         public HANDLE hConvPartner;
    322.         public HANDLE hszSvcPartner;
    323.         public HANDLE hszServiceReq;
    324.         public HANDLE hszTopic;
    325.         public HANDLE hszItem;
    326.         public int wFmt;
    327.         public int wType;
    328.         public int wStatus;
    329.         public int wConvst;
    330.         public int wLastError;
    331.         public HANDLE hConvList;
    332.         public CONVCONTEXT ConvCtxt;
    333.         public HWND hwnd;
    334.         public HWND hwndPartner;
    335.     }
    336.     public struct DDEML_MSG_HOOK_DATA
    337.     {
    338.         public int uiLo;
    339.         public int uiHi;
    340.         public int cbData;
    341.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=8)] public int Data;
    342.     }
    343.     public struct MONMSGSTRUCT
    344.     {
    345.         public int cb;
    346.         public HWND hwndTo;
    347.         public int dwTime;
    348.         public HANDLE htask;
    349.         public int wMsg;
    350.         public int wParam;
    351.         public int lParam;
    352.         public DDEML_MSG_HOOK_DATA dmhd;
    353.     }
    354.     public struct MONCBSTRUCT
    355.     {
    356.         public int cb;
    357.         public int dwTime;
    358.         public HANDLE htask;
    359.         public int dwRet;
    360.         public int wType;
    361.         public int wFmt;
    362.         public HANDLE hConv;
    363.         public HANDLE hsz1;
    364.         public HANDLE hsz2;
    365.         public HANDLE hData;
    366.         public int dwData1;
    367.         public int dwData2;
    368.         public CONVCONTEXT cc;
    369.         public int cbData;
    370.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=8)] public int Data;
    371.     }
    372.     public struct MONHSZSTRUCT
    373.     {
    374.         public int cb;
    375.         public int fsAction;
    376.         public int dwTime;
    377.         public HANDLE hsz;
    378.         public HANDLE htask;
    379.         public byte str;
    380.     }
    381.     public struct MONERRSTRUCT
    382.     {
    383.         public int cb;
    384.         public int wLastError;
    385.         public int dwTime;
    386.         public HANDLE htask;
    387.     }
    388.     public struct MONLINKSTRUCT
    389.     {
    390.         public int cb;
    391.         public int dwTime;
    392.         public HANDLE htask;
    393.         public int fEstablished;
    394.         public int fNoData;
    395.         public HANDLE hszSvc;
    396.         public HANDLE hszTopic;
    397.         public HANDLE hszItem;
    398.         public int wFmt;
    399.         public int fServer;
    400.         public HANDLE hConvServer;
    401.         public HANDLE hConvClient;
    402.     }
    403.     public struct MONCONVSTRUCT
    404.     {
    405.         public int cb;
    406.         public int fConnect;
    407.         public int dwTime;
    408.         public HANDLE htask;
    409.         public HANDLE hszSvc;
    410.         public HANDLE hszTopic;
    411.         public HANDLE hConvClient;
    412.         public HANDLE hConvServer;
    413.     }
    414.     public struct DRAWTEXTPARAMS
    415.     {
    416.         public int cbSize;
    417.         public int iTabLength;
    418.         public int iLeftMargin;
    419.         public int iRightMargin;
    420.         public int uiLengthDrawn;
    421.     }
    422.     public struct MENUITEMINFO
    423.     {
    424.         public int cbSize;
    425.         public int fMask;
    426.         public int fType;
    427.         public int fState;
    428.         public int wID;
    429.         public HANDLE hSubMenu;
    430.         public HANDLE hbmpChecked;
    431.         public HANDLE hbmpUnchecked;
    432.         public int dwItemData;
    433.         public string dwTypeData;
    434.         public int cch;
    435.     }
    436.     public struct SCROLLINFO
    437.     {
    438.         public int cbSize;
    439.         public int fMask;
    440.         public int nMin;
    441.         public int nMax;
    442.         public int nPage;
    443.         public int nPos;
    444.         public int nTrackPos;
    445.     }
    446.     public struct MSGBOXPARAMS
    447.     {
    448.         public int cbSize;
    449.         public HWND hwndOwner;
    450.         public HANDLE hInstance;
    451.         public string lpszText;
    452.         public string lpszCaption;
    453.         public int dwStyle;
    454.         public string lpszIcon;
    455.         public int dwContextHelpId;
    456.         public int lpfnMsgBoxCallback;
    457.         public int dwLanguageId;
    458.     }
    459.     public struct WNDCLASSEX
    460.     {
    461.         public int cbSize;
    462.         public int style;
    463.         public int lpfnWndProc;
    464.         public int cbClsExtra;
    465.         public int cbWndExtra;
    466.         public HANDLE hInstance;
    467.         public HANDLE hIcon;
    468.         public HANDLE hCursor;
    469.         public HANDLE hbrBackground;
    470.         public string lpszMenuName;
    471.         public string lpszClassName;
    472.         public HANDLE hIconSm;
    473.     }
    474.     public struct TPMPARAMS
    475.     {
    476.         public int cbSize;
    477.         public RECT rcExclude;
    478.     }
    479.     public struct BROWSEINFO
    480.     {
    481.         public HWND hwndOwner;
    482.         public int pIDLRoot;
    483.         public int pszDisplayName;
    484.         public int lpszTitle;
    485.         public int ulFlags;
    486.         public int lpfnCallback;
    487.         public int lParam;
    488.         public int iImage;
    489.     }

    490.     public abstract class ComCtl
    491.     {
    492.         [DllImport("COMCTL32")] public static extern int ImageList_AddIcon(HANDLE himl, HANDLE hIcon);
    493.         [DllImport("COMCTL32")] public static extern int ImageList_Create(int MinCx, int MinCy, int flags, int cInitial, int cGrow);
    494.         [DllImport("COMCTL32")] public static extern int ImageList_Draw(HANDLE hIMAGELIST, int ImgIndex, HWND hdcDest, int xDest, int yDest, int lStyle);
    495.         [DllImport("COMCTL32")] public static extern int ImageList_GetIcon(HANDLE hIMAGELIST, int ImgIndex, HANDLE hbmMask);
    496.         [DllImport("COMCTL32")] public static extern int InitCommonControls();
    497.     }

    498.     public abstract class Ole
    499.     {
    500.         [DllImport("ole32")] public static extern int OleInitialize(IntPtr vbNullString);
    501.         [DllImport("ole32")] public static extern void CoTaskMemFree(HANDLE hMem);
    502.         [DllImport("ole32")] public static extern void OleUninitialize();
    503.     }
    504.    
    505.     public class User
    506.     {
    507.         [DllImport("advapi32")] public static extern int SetServiceBits(HANDLE hServiceStatus, int dwServiceBits, int bSetBitsOn, int bUpdateImmediately);
    508.         [DllImport("kernel32")] public static extern int SetSystemTimeAdjustment(int dwTimeAdjustment, int bTimeAdjustmentDisabled);
    509.         [DllImport("mpr")] public static extern int WNetGetUniversalName(string lpLocalPath, int dwInfoLevel, StringBuilder lpBuffer, ref int lpBufferSize);
    510.         [DllImport("user32")] public static extern int ActivateKeyboardLayout(HANDLE hKL, int flags);
    511.         [DllImport("user32")] public static extern int AdjustWindowRect(ref RECT lpRect, int dwStyle, int bMenu);
    512.         [DllImport("user32")] public static extern int AdjustWindowRectEx(ref RECT lpRect, int dsStyle, int bMenu, int dwEsStyle);
    513.         [DllImport("user32")] public static extern int AnyPopup();
    514.         [DllImport("user32")] public static extern int AppendMenu(HANDLE hMenu, int wFlags, int wIDNewItem, IntPtr lpNewItem);
    515.         [DllImport("user32")] public static extern int ArrangeIconicWindows(HWND hwnd);
    516.         [DllImport("user32")] public static extern int AttachThreadInput(int idAttach, int idAttachTo, int fAttach);
    517.         [DllImport("user32")] public static extern int BeginDeferWindowPos(int nNumWindows);
    518.         [DllImport("user32")] public static extern int BeginPaint(HWND hwnd, ref PAINTSTRUCT lpPaint);
    519.         [DllImport("user32")] public static extern int BringWindowToTop(HWND hwnd);
    520.         [DllImport("user32")] public static extern int BroadcastSystemMessage(int dw, ref int pdw, int un, int wParam, int lParam);
    521.         [DllImport("user32")] public static extern int CallMsgFilter(ref MSG lpMsg, int ncode);
    522.         [DllImport("user32")] public static extern int CallNextHookEx(HANDLE hHook, int ncode, int wParam, IntPtr lParam);
    523.         [DllImport("user32")] public static extern int CallWindowProc(int lpPrevWndFunc, HWND hwnd, int Msg, int wParam, int lParam);
    524.         [DllImport("user32")] public static extern int ChangeClipboardChain(HWND hwnd, HWND hwndNext);
    525.         [DllImport("user32")] public static extern int ChangeMenu(HANDLE hMenu, int cmd, string lpszNewItem, int cmdInsert, int flags);
    526.         [DllImport("user32")] public static extern int CharLowerBuff(string lpsz, int cchLength);
    527.         [DllImport("user32")] public static extern int CharToOem(string lpszSrc, string lpszDst);
    528.         [DllImport("user32")] public static extern int CharToOemBuff(string lpszSrc, string lpszDst, int cchDstLength);
    529.         [DllImport("user32")] public static extern int CharUpperBuff(string lpsz, int cchLength);
    530.         [DllImport("user32")] public static extern int CheckDlgButton(HANDLE hDlg, int nIDButton, int wCheck);
    531.         [DllImport("user32")] public static extern int CheckMenuItem(HANDLE hMenu, int wIDCheckItem, int wCheck);
    532.         [DllImport("user32")] public static extern int CheckMenuRadioItem(HANDLE hMenu, int un1, int un2, int un3, int un4);
    533.         [DllImport("user32")] public static extern int CheckRadioButton(HANDLE hDlg, int nIDFirstButton, int nIDLastButton, int nIDCheckButton);
    534.         [DllImport("user32")] public static extern int ChildWindowFromPoint(HWND hwnd, int xPoint, int yPoint);
    535.         [DllImport("user32")] public static extern int ChildWindowFromPointEx(HWND hwnd, int xPoint, int yPoint, int un);
    536.         [DllImport("user32")] public static extern int ClientToScreen(HWND hwnd, ref POINT lpPoint);
    537.         [DllImport("user32")] public static extern int ClipCursor(ref RECT lpRect);
    538.         [DllImport("user32")] public static extern int CloseClipboard();
    539.         [DllImport("user32")] public static extern int CloseDesktop(HANDLE hDesktop);
    540.         [DllImport("user32")] public static extern int CloseWindow(HWND hwnd);
    541.         [DllImport("user32")] public static extern int CloseWindowStation(HANDLE hWinSta);
    542.         [DllImport("user32")] public static extern int CopyAcceleratorTable(HANDLE hAccelSrc, ACCEL[] lpAccelDst, int cAccelEntries);
    543.         [DllImport("user32")] public static extern int CopyCursor(HANDLE hcur);
    544.         [DllImport("user32")] public static extern int CopyIcon(HANDLE hIcon);
    545.         [DllImport("user32")] public static extern int CopyImage(HANDLE handle, int un1, int n1, int n2, int un2);
    546.         [DllImport("user32")] public static extern int CopyRect(ref RECT lpDestRect, ref RECT lpSourceRect);
    547.         [DllImport("user32")] public static extern int CountClipboardFormats();
    548.         [DllImport("user32")] public static extern int CreateAcceleratorTable(ref ACCEL lpaccl, int cEntries);
    549.         [DllImport("user32")] public static extern int CreateCaret(HWND hwnd, HANDLE hBitmap, int nWidth, int nHeight);
    550.         [DllImport("user32")] public static extern int CreateCursor(HANDLE hInstance, int nXhotspot, int nYhotspot, int nWidth, int nHeight, IntPtr lpANDbitPlane, IntPtr lpXORbitPlane);
    551.         [DllImport("user32")] public static extern int CreateDesktop(string lpszDesktop, string lpszDevice, ref DEVMODE pDevmode, int dwFlags, int dwDesiredAccess, ref SECURITY_ATTRIBUTES lpsa);
    552.         [DllImport("user32")] public static extern int CreateDialogIndirectParam(HANDLE hInstance, ref DLGTEMPLATE lpTemplate, HWND hwndParent, ref int lpDialogFunc, int dwInitParam);
    553.         [DllImport("user32")] public static extern int CreateDialogParam(HANDLE hInstance, string lpName, HWND hwndParent, ref int lpDialogFunc, int lParamInit);
    554.         [DllImport("user32")] public static extern int CreateIcon(HANDLE hInstance, int nWidth, int nHeight, Byte nPlanes, Byte nBitsPixel, Byte lpANDbits, Byte lpXORbits);
    555.         [DllImport("user32")] public static extern int CreateIconFromResource(Byte presbits, int dwResSize, int fIcon, int dwVer);
    556.         [DllImport("user32")] public static extern int CreateIconIndirect(ref ICONINFO piconinfo);
    557.         [DllImport("user32")] public static extern int CreateMDIWindow(string lpClassName, string lpWindowName, int dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent, HANDLE hInstance, int lParam);
    558.         [DllImport("user32")] public static extern int CreateMenu();
    559.         [DllImport("user32")] public static extern int CreatePopupMenu();
    560.         [DllImport("user32")] public static extern int CreateWindowEx(int dwExStyle, string lpClassName, string lpWindowName, int dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent, HANDLE hMenu, HANDLE hInstance, IntPtr lpParam);
    561.         [DllImport("user32")] public static extern int DdeAbandonTransaction(int idInst, HANDLE hConv, int idTransaction);
    562.         [DllImport("user32")] public static extern int DdeAccessData(HANDLE hData, ref int pcbDataSize);
    563.         [DllImport("user32")] public static extern int DdeAddData(HANDLE hData, Byte pSrc, int cb, int cbOff);
    564.         [DllImport("user32")] public static extern int DdeClientTransaction(Byte pData, int cbData, HANDLE hConv, HANDLE hszItem, int wFmt, int wType, int dwTimeout, ref int pdwResult);
    565.         [DllImport("user32")] public static extern int DdeCmpStringHandles(HANDLE hsz1, HANDLE hsz2);
    566.         [DllImport("user32")] public static extern int DdeConnect(int idInst, HANDLE hszService, HANDLE hszTopic, ref CONVCONTEXT pCC);
    567.         [DllImport("user32")] public static extern int DdeConnectList(int idInst, HANDLE hszService, HANDLE hszTopic, HANDLE hConvList, ref CONVCONTEXT pCC);
    568.         [DllImport("user32")] public static extern int DdeCreateDataHandle(int idInst, Byte pSrc, int cb, int cbOff, HANDLE hszItem, int wFmt, int afCmd);
    569.         [DllImport("user32")] public static extern int DdeCreateStringHandle(int idInst, string psz, int iCodePage);
    570.         [DllImport("user32")] public static extern int DdeDisconnect(HANDLE hConv);
    571.         [DllImport("user32")] public static extern int DdeDisconnectList(HANDLE hConvList);
    572.         [DllImport("user32")] public static extern int DdeEnableCallback(int idInst, HANDLE hConv, int wCmd);
    573.         [DllImport("user32")] public static extern int DdeFreeDataHandle(HANDLE hData);
    574.         [DllImport("user32")] public static extern int DdeFreeStringHandle(int idInst, HANDLE hsz);
    575.         [DllImport("user32")] public static extern int DdeGetData(HANDLE hData, Byte pDst, int cbMax, int cbOff);
    576.         [DllImport("user32")] public static extern int DdeGetLastError(int idInst);
    577.         [DllImport("user32")] public static extern int DdeImpersonateClient(HANDLE hConv);
    578.         [DllImport("user32")] public static extern int DdeKeepStringHandle(int idInst, HANDLE hsz);
    579.         [DllImport("user32")] public static extern int DdeNameService(int idInst, HANDLE hsz1, HANDLE hsz2, int afCmd);
    580.         [DllImport("user32")] public static extern int DdePostAdvise(int idInst, HANDLE hszTopic, HANDLE hszItem);
    581.         [DllImport("user32")] public static extern int DdeQueryConvInfo(HANDLE hConv, int idTransaction, ref CONVINFO pConvInfo);
    582.         [DllImport("user32")] public static extern int DdeQueryNextServer(HANDLE hConvList, HANDLE hConvPrev);
    583.         [DllImport("user32")] public static extern int DdeQueryString(int idInst, HANDLE hsz, string psz, int cchMax, int iCodePage);
    584.         [DllImport("user32")] public static extern int DdeReconnect(HANDLE hConv);
    585.         [DllImport("user32")] public static extern int DdeSetQualityOfService(HWND hwndClient, ref SECURITY_QUALITY_OF_SERVICE pqosNew, ref SECURITY_QUALITY_OF_SERVICE pqosPrev);
    586.         [DllImport("user32")] public static extern int DdeSetUserHandle(HANDLE hConv, int id, HANDLE hUser);
    587.         [DllImport("user32")] public static extern int DdeUnaccessData(HANDLE hData);
    588.         [DllImport("user32")] public static extern int DdeUninitialize(int idInst);
    589.         [DllImport("user32")] public static extern int DefDlgProc(HANDLE hDlg, int wMsg, int wParam, int lParam);
    590.         [DllImport("user32")] public static extern int DefFrameProc(HWND hwnd, HWND hwndMDIClient, int wMsg, int wParam, int lParam);
    591.         [DllImport("user32")] public static extern int DefMDIChildProc(HWND hwnd, int wMsg, int wParam, int lParam);
    592.         [DllImport("user32")] public static extern int DefWindowProc(HWND hwnd, int wMsg, int wParam, int lParam);
    593.         [DllImport("user32")] public static extern int DeferWindowPos(HANDLE hWinPosInfo, HWND hwnd, HWND hwndInsertAfter, int x, int y, int cx, int cy, int wFlags);
    594.         [DllImport("user32")] public static extern int DeleteMenu(HANDLE hMenu, int nPosition, int wFlags);
    595.         [DllImport("user32")] public static extern int DestroyAcceleratorTable(HANDLE haccel);
    596.         [DllImport("user32")] public static extern int DestroyCaret();
    597.         [DllImport("user32")] public static extern int DestroyCursor(HANDLE hCursor);
    598.         [DllImport("user32")] public static extern int DestroyIcon(HANDLE hIcon);
    599.         [DllImport("user32")] public static extern int DestroyMenu(HANDLE hMenu);
    600.         [DllImport("user32")] public static extern int DestroyWindow(HWND hwnd);
    601.         [DllImport("user32")] public static extern int DialogBoxIndirectParam(HANDLE hInstance, DLGTEMPLATE hDialogTemplate, HWND hwndParent, ref int lpDialogFunc, int dwInitParam);
    602.         [DllImport("user32")] public static extern int DispatchMessage(ref MSG lpMsg);
    603.         [DllImport("user32")] public static extern int DlgDirList(HANDLE hDlg, string lpPathSpec, int nIDListBox, int nIDStaticPath, int wFileType);
    604.         [DllImport("user32")] public static extern int DlgDirListComboBox(HANDLE hDlg, string lpPathSpec, int nIDComboBox, int nIDStaticPath, int wFileType);
    605.         [DllImport("user32")] public static extern int DlgDirSelectComboBoxEx(HWND hwndDlg, string lpszPath, int cbPath, int idComboBox);
    606.         [DllImport("user32")] public static extern int DlgDirSelectEx(HWND hwndDlg, string lpszPath, int cbPath, int idListBox);
    607.         [DllImport("user32")] public static extern int DragDetect(HWND hwnd, POINT pt);
    608.         [DllImport("user32")] public static extern int DragObject(HWND hwnd1, HWND hwnd2, int un, int dw, HANDLE hCursor);
    609.         [DllImport("user32")] public static extern int DrawAnimatedRects(HWND hwnd, int idAni, ref RECT lprcFrom, ref RECT lprcTo);
    610.         [DllImport("user32")] public static extern int DrawCaption(HWND hwnd, HWND hdc, ref RECT pcRect, int un);
    611.         [DllImport("user32")] public static extern int DrawEdge(HDC hdc, ref RECT qrc, int edge, int grfFlags);
    612.         [DllImport("user32")] public static extern int DrawFocusRect(HDC hdc, ref RECT lpRect);
    613.         [DllImport("user32")] public static extern int DrawFrameControl(HWND hdc, ref RECT lpRect, int un1, int un2);
    614.         [DllImport("user32")] public static extern int DrawIcon(HDC hdc, int x, int y, HANDLE hIcon);
    615.         [DllImport("user32")] public static extern int DrawIconEx(HDC hdc, int xLeft, int yTop, HANDLE hIcon, int cxWidth, int cyWidth, int istepIfAniCur, HANDLE hbrFlickerFreeDraw, int diFlags);
    616.         [DllImport("user32")] public static extern int DrawMenuBar(HWND hwnd);
    617.         [DllImport("user32")] public static extern int DrawState(HWND hdc, HANDLE hBrush, ref int lpDrawStateProc, int lParam, int wParam, int n1, int n2, int n3, int n4, int un);
    618.         [DllImport("user32")] public static extern int DrawText(HDC hdc, string lpStr, int nCount, ref RECT lpRect, int wFormat);
    619.         [DllImport("user32")] public static extern int DrawTextEx(HWND hdc, string lpsz, int n, ref RECT lpRect, int un, ref DRAWTEXTPARAMS lpDrawTextParams);
    620.         [DllImport("user32")] public static extern int EmptyClipboard();
    621.         [DllImport("user32")] public static extern int EnableMenuItem(HANDLE hMenu, int wIDEnableItem, int wEnable);
    622.         [DllImport("user32")] public static extern int EnableScrollBar(HWND hwnd, int wSBflags, int wArrows);
    623.         [DllImport("user32")] public static extern int EnableWindow(HWND hwnd, int fEnable);
    624.         [DllImport("user32")] public static extern int EndDeferWindowPos(HANDLE hWinPosInfo);
    625.         [DllImport("user32")] public static extern int EndDialog(HANDLE hDlg, int nResult);
    626.         [DllImport("user32")] public static extern int EndPaint(HWND hwnd, ref PAINTSTRUCT lpPaint);
    627.         [DllImport("user32")] public static extern int EnumChildWindows(HWND hwndParent, ref int lpEnumFunc, int lParam);
    628.         [DllImport("user32")] public static extern int EnumClipboardFormats(int wFormat);
    629.         [DllImport("user32")] public static extern int EnumDesktopWindows(HANDLE hDesktop, ref int lpfn, int lParam);
    630.         [DllImport("user32")] public static extern int EnumDesktops(HANDLE hwinsta, ref int lpEnumFunc, int lParam);
    631.         [DllImport("user32")] public static extern int EnumProps(HWND hwnd, ref int lpEnumFunc);
    632.         [DllImport("user32")] public static extern int EnumPropsEx(HWND hwnd, ref int lpEnumFunc, int lParam);
    633.         [DllImport("user32")] public static extern int EnumThreadWindows(int dwThreadId, ref int lpfn, int lParam);
    634.         [DllImport("user32")] public static extern int EnumWindowStations(int lpEnumFunc, int lParam);
    635.         [DllImport("user32")] public static extern int EnumWindows(int lpEnumFunc, int lParam);
    636.         [DllImport("user32")] public static extern int EqualRect(ref RECT lpRect1, ref RECT lpRect2);
    637.         [DllImport("user32")] public static extern int ExcludeUpdateRgn(HDC hdc, HWND hwnd);
    638.         [DllImport("user32")] public static extern int ExitWindows(int dwReserved, int uReturnCode);
    639.         [DllImport("user32")] public static extern int ExitWindowsEx(int uFlags, int dwReserved);
    640.         [DllImport("user32")] public static extern int FillRect(HDC hdc, ref RECT lpRect, HANDLE hBrush);
    641.         [DllImport("user32")] public static extern int FindWindow(string lpClassName, string lpWindowName);
    642.         [DllImport("user32")] public static extern int FindWindowEx(HWND hwnd1, HWND hwnd2, string lpsz1, string lpsz2);
    643.         [DllImport("user32")] public static extern int FlashWindow(HWND hwnd, int bInvert);
    644.         [DllImport("user32")] public static extern int FrameRect(HDC hdc, ref RECT lpRect, HANDLE hBrush);
    645.         [DllImport("user32")] public static extern int FreeDDElParam(int msg, int lParam);
    646.         [DllImport("user32")] public static extern int GetActiveWindow();
    647.         [DllImport("user32")] public static extern int GetCapture();
    648.         [DllImport("user32")] public static extern int GetCaretBlinkTime();
    649.         [DllImport("user32")] public static extern int GetCaretPos(ref POINT lpPoint);
    650.         [DllImport("user32")] public static extern int GetClassInfo(HANDLE hInstance, string lpClassName, out WNDCLASS lpWndClass);
    651.         [DllImport("user32")] public static extern int GetClassLong(HWND hwnd, int nIndex);
    652.         [DllImport("user32")] public static extern int GetClassName(HWND hwnd, string lpClassName, int nMaxCount);
    653.         [DllImport("user32")] public static extern int GetClassWord(HWND hwnd, int nIndex);
    654.         [DllImport("user32")] public static extern int GetClientRect(HWND hwnd, ref RECT lpRect);
    655.         [DllImport("user32")] public static extern int GetClipCursor(out RECT lprc);
    656.         [DllImport("user32")] public static extern int GetClipboardData(int wFormat);
    657.         [DllImport("user32")] public static extern int GetClipboardFormatName(int wFormat, string lpString, int nMaxCount);
    658.         [DllImport("user32")] public static extern int GetClipboardOwner();
    659.         [DllImport("user32")] public static extern int GetClipboardViewer();
    660.         [DllImport("user32")] public static extern int GetCursor();
    661.         [DllImport("user32")] public static extern int GetCursorPos(out POINT lpPoint);
    662.         [DllImport("user32")] public static extern int GetDC(HWND hwnd);
    663.         [DllImport("user32")] public static extern int GetDCEx(HWND hwnd, HANDLE hrgnclip, int fdwOptions);
    664.         [DllImport("user32")] public static extern int GetDesktopWindow();
    665.         [DllImport("user32")] public static extern int GetDialogBaseUnits();
    666.         [DllImport("user32")] public static extern int GetDlgCtrlID(HWND hwnd);
    667.         [DllImport("user32")] public static extern int GetDlgItem(HANDLE hDlg, int nIDDlgItem);
    668.         [DllImport("user32")] public static extern int GetDlgItemInt(HANDLE hDlg, int nIDDlgItem, ref int lpTranslated, int bSigned);
    669.         [DllImport("user32")] public static extern int GetDlgItemText(HANDLE hDlg, int nIDDlgItem, StringBuilder lpString, int nMaxCount);
    670.         [DllImport("user32")] public static extern int GetDoubleClickTime();
    671.         [DllImport("user32")] public static extern int GetFocus();
    672.         [DllImport("user32")] public static extern int GetForegroundWindow();
    673.         [DllImport("user32")] public static extern int GetIconInfo(HANDLE hIcon, out ICONINFO piconinfo);
    674.         [DllImport("user32")] public static extern int GetInputState();
    675.         [DllImport("user32")] public static extern int GetKBCodePage();
    676.         [DllImport("user32")] public static extern int GetKeyNameText(int lParam, StringBuilder lpBuffer, int nSize);
    677.         [DllImport("user32")] public static extern int GetKeyboardLayout(int dwLayout);
    678.         [DllImport("user32")] public static extern int GetKeyboardLayoutList(int nBuff, ref int lpList);
    679.         [DllImport("user32")] public static extern int GetKeyboardLayoutName(string pwszKLID);
    680.         [DllImport("user32")] public static extern int GetKeyboardState(Byte pbKeyState);
    681.         [DllImport("user32")] public static extern int GetKeyboardType(int nTypeFlag);
    682.         [DllImport("user32")] public static extern int GetLastActivePopup(HWND hwndOwnder);
    683.         [DllImport("user32")] public static extern int GetMenu(HWND hwnd);
    684.         [DllImport("user32")] public static extern int GetMenuCheckMarkDimensions();
    685.         [DllImport("user32")] public static extern int GetMenuContextHelpId(HANDLE hMenu);
    686.         [DllImport("user32")] public static extern int GetMenuDefaultItem(HANDLE hMenu, int fByPos, int gmdiFlags);
    687.         [DllImport("user32")] public static extern int GetMenuItemCount(HANDLE hMenu);
    688.         [DllImport("user32")] public static extern int GetMenuItemID(HANDLE hMenu, int nPos);
    689.         [DllImport("user32")] public static extern int GetMenuItemInfo(HANDLE hMenu, int un, int b, ref MENUITEMINFO lpMenuItemInfo);
    690.         [DllImport("user32")] public static extern int GetMenuItemRect(HWND hwnd, HANDLE hMenu, int uItem, ref RECT lprcItem);
    691.         [DllImport("user32")] public static extern int GetMenuState(HANDLE hMenu, int wID, int wFlags);
    692.         [DllImport("user32")] public static extern int GetMenuString(HANDLE hMenu, int wIDItem, StringBuilder lpString, int nMaxCount, int wFlag);
    693.         [DllImport("user32")] public static extern int GetMessage(ref MSG lpMsg, HWND hwnd, int wMsgFilterMin, int wMsgFilterMax);
    694.         [DllImport("user32")] public static extern int GetMessageExtraInfo();
    695.         [DllImport("user32")] public static extern int GetMessagePos();
    696.         [DllImport("user32")] public static extern int GetMessageTime();
    697.         [DllImport("user32")] public static extern int GetNextDlgGroupItem(HANDLE hDlg, HANDLE hCtl, int bPrevious);
    698.         [DllImport("user32")] public static extern int GetNextDlgTabItem(HANDLE hDlg, HANDLE hCtl, int bPrevious);
    699.         [DllImport("user32")] public static extern int GetNextWindow(HWND hwnd, int wFlag);
    700.         [DllImport("user32")] public static extern int GetOpenClipboardWindow();
    701.         [DllImport("user32")] public static extern int GetParent(HWND hwnd);
    702.         [DllImport("user32")] public static extern int GetPriorityClipboardFormat(int lpPriorityList, int nCount);
    703.         [DllImport("user32")] public static extern int GetProcessWindowStation();
    704.         [DllImport("user32")] public static extern int GetProp(HWND hwnd, string lpString);
    705.         [DllImport("user32")] public static extern int GetQueueStatus(int fuFlags);
    706.         [DllImport("user32")] public static extern int GetScrollInfo(HWND hwnd, int n, ref SCROLLINFO lpScrollInfo);
    707.         [DllImport("user32")] public static extern int GetScrollPos(HWND hwnd, int nBar);
    708.         [DllImport("user32")] public static extern int GetScrollRange(HWND hwnd, int nBar, ref int lpMinPos, ref int lpMaxPos);
    709.         [DllImport("user32")] public static extern int GetSubMenu(HANDLE hMenu, int nPos);
    710.         [DllImport("user32")] public static extern int GetSysColor(int nIndex);
    711.         [DllImport("user32")] public static extern int GetSysColorBrush(int nIndex);
    712.         [DllImport("user32")] public static extern int GetSystemMenu(HWND hwnd, int bRevert);
    713.         [DllImport("user32")] public static extern int GetSystemMetrics(int nIndex);
    714.         [DllImport("user32")] public static extern int GetTabbedTextExtent(HDC hdc, string lpString, int nCount, int nTabPositions, ref int lpnTabStopPositions);
    715.         [DllImport("user32")] public static extern int GetThreadDesktop(int dwThread);
    716.         [DllImport("user32")] public static extern int GetTopWindow(HWND hwnd);
    717.         [DllImport("user32")] public static extern int GetUpdateRect(HWND hwnd, ref RECT lpRect, int bErase);
    718.         [DllImport("user32")] public static extern int GetUpdateRgn(HWND hwnd, HANDLE hRgn, int fErase);
    719.         [DllImport("user32")] public static extern int GetUserObjectInformation(HANDLE hObj, int nIndex, IntPtr pvInfo, int nLength, ref int lpnLengthNeeded);
    720.         [DllImport("user32")] public static extern int GetUserObjectSecurity(HANDLE hObj, ref int pSIRequested, ref SECURITY_DESCRIPTOR pSd, int nLength, ref int lpnLengthNeeded);
    721.         [DllImport("user32")] public static extern int GetWindow(HWND hwnd, int wCmd);
    722.         [DllImport("user32")] public static extern int GetWindowContextHelpId(HWND hwnd);
    723.         [DllImport("user32")] public static extern int GetWindowDC(HWND hwnd);
    724.         [DllImport("user32")] public static extern int GetWindowLong(HWND hwnd, int nIndex);
    725.         [DllImport("user32")] public static extern int GetWindowPlacement(HWND hwnd, ref WINDOWPLACEMENT lpwndpl);
    726.         [DllImport("user32")] public static extern int GetWindowRect(HWND hwnd, ref RECT lpRect);
    727.         [DllImport("user32")] public static extern int GetWindowRgn(HWND hwnd, HANDLE hRgn);
    728.         [DllImport("user32")] public static extern int GetWindowText(HWND hwnd, StringBuilder lpString, int cch);
    729.         [DllImport("user32")] public static extern int GetWindowTextLength(HWND hwnd);
    730.         [DllImport("user32")] public static extern int GetWindowThreadProcessId(HWND hwnd, ref int lpdwProcessId);
    731.         [DllImport("user32")] public static extern int GrayString(HWND hdc, HANDLE hBrush, ref int lpOutputFunc, ref int lpData, int nCount, int X, int Y, int nWidth, int nHeight);
    732.         [DllImport("user32")] public static extern int HideCaret(HWND hwnd);
    733.         [DllImport("user32")] public static extern int HiliteMenuItem(HWND hwnd, HANDLE hMenu, int wIDHiliteItem, int wHilite);
    734.         [DllImport("user32")] public static extern int ImpersonateDdeClientWindow(HWND hwndClient, HWND hwndServer);
    735.         [DllImport("user32")] public static extern int InSendMessage();
    736.         [DllImport("user32")] public static extern int InflateRect(ref RECT lpRect, int x, int y);
    737.         [DllImport("user32")] public static extern int InsertMenu(HANDLE hMenu, int nPosition, int wFlags, int wIDNewItem, IntPtr lpNewItem);
    738.         [DllImport("user32")] public static extern int InsertMenuItem(HANDLE hMenu, int un, bool b, ref MENUITEMINFO lpcMenuItemInfo);
    739.         [DllImport("user32")] public static extern int IntersectRect(ref RECT lpDestRect, ref RECT lpSrc1Rect, ref RECT lpSrc2Rect);
    740.         [DllImport("user32")] public static extern int InvalidateRect(HWND hwnd, ref RECT lpRect, int bErase);
    741.         [DllImport("user32")] public static extern int InvalidateRgn(HWND hwnd, HANDLE hRgn, int bErase);
    742.         [DllImport("user32")] public static extern int InvertRect(HDC hdc, ref RECT lpRect);
    743.         [DllImport("user32")] public static extern int IsCharAlpha(Byte cChar);
    744.         [DllImport("user32")] public static extern int IsCharAlphaNumeric(Byte cChar);
    745.         [DllImport("user32")] public static extern int IsCharLower(Byte cChar);
    746.         [DllImport("user32")] public static extern int IsCharUpper(Byte cChar);
    747.         [DllImport("user32")] public static extern int IsChild(HWND hwndParent, HWND hwnd);
    748.         [DllImport("user32")] public static extern int IsClipboardFormatAvailable(int wFormat);
    749.         [DllImport("user32")] public static extern int IsDialogMessage(HANDLE hDlg, ref MSG lpMsg);
    750.         [DllImport("user32")] public static extern int IsDlgButtonChecked(HANDLE hDlg, int nIDButton);
    751.         [DllImport("user32")] public static extern int IsIconic(HWND hwnd);
    752.         [DllImport("user32")] public static extern int IsMenu(HANDLE hMenu);
    753.         [DllImport("user32")] public static extern int IsRectEmpty(ref RECT lpRect);
    754.         [DllImport("user32")] public static extern int IsWindow(HWND hwnd);
    755.         [DllImport("user32")] public static extern int IsWindowEnabled(HWND hwnd);
    756.         [DllImport("user32")] public static extern int IsWindowUnicode(HWND hwnd);
    757.         [DllImport("user32")] public static extern int IsWindowVisible(HWND hwnd);
    758.         [DllImport("user32")] public static extern int IsZoomed(HWND hwnd);
    759.         [DllImport("user32")] public static extern int KillTimer(HWND hwnd, int nIDEvent);
    760.         [DllImport("user32")] public static extern int LoadAccelerators(HANDLE hInstance, string lpTableName);
    761.         [DllImport("user32")] public static extern int LoadBitmap(HANDLE hInstance, string lpBitmapName);
    762.         [DllImport("user32")] public static extern int LoadCursor(HANDLE hInstance, string lpCursorName);
    763.         [DllImport("user32")] public static extern int LoadCursorFromFile(string lpFileName);
    764.         [DllImport("user32")] public static extern int LoadIcon(HANDLE hInstance, string lpIconName);
    765.         [DllImport("user32")] public static extern int LoadImage(HANDLE hInst, string lpsz, int un1, int n1, int n2, int un2);
    766.         [DllImport("user32")] public static extern int LoadKeyboardLayout(string pwszKLID, int flags);
    767.         [DllImport("user32")] public static extern int LoadMenu(HANDLE hInstance, string lpString);
    768.         [DllImport("user32")] public static extern int LoadMenuIndirect(int lpMenuTemplate);
    769.         [DllImport("user32")] public static extern int LoadString(HANDLE hInstance, int wID, string lpBuffer, int nBufferMax);
    770.         [DllImport("user32")] public static extern int LockWindowUpdate(HWND hwndLock);
    771.         [DllImport("user32")] public static extern int LookupIconIdFromDirectory(Byte presbits, int fIcon);
    772.         [DllImport("user32")] public static extern int LookupIconIdFromDirectoryEx(Byte presbits, int fIcon, int cxDesired, int cyDesired, int Flags);
    773.         [DllImport("user32")] public static extern int MapDialogRect(HANDLE hDlg, ref RECT lpRect);
    774.         [DllImport("user32")] public static extern int MapVirtualKey(int wCode, int wMapType);
    775.         [DllImport("user32")] public static extern int MapVirtualKeyEx(int uCode, int uMapType, int dwhkl);
    776.         [DllImport("user32")] public static extern int MapWindowPoints(HWND hwndFrom, HWND hwndTo, POINT [] lppt, int cPoints);
    777.         [DllImport("user32")] public static extern int MenuItemFromPoint(HWND hwnd, HANDLE hMenu, POINT ptScreen);
    778.         [DllImport("user32")] public static extern int MessageBeep(int wType);
    779.         [DllImport("user32")] public static extern int MessageBox(HWND hwnd, string lpText, string lpCaption, int wType);
    780.         [DllImport("user32")] public static extern int MessageBoxEx(HWND hwnd, string lpText, string lpCaption, int uType, int wLanguageId);
    781.         [DllImport("user32")] public static extern int MessageBoxIndirect(ref MSGBOXPARAMS lpMsgBoxParams);
    782.         [DllImport("user32")] public static extern int ModifyMenu(HANDLE hMenu, int nPosition, int wFlags, int wIDNewItem, IntPtr lpString);
    783.         [DllImport("user32")] public static extern int MoveWindow(HWND hwnd, int x, int y, int nWidth, int nHeight, int bRepaint);
    784.         [DllImport("user32")] public static extern int MsgWaitForMultipleObjects(int nCount, ref int pHandles, int fWaitAll, int dwMilliseconds, int dwWakeMask);
    785.         [DllImport("user32")] public static extern int OemKeyScan(int wOemChar);
    786.         [DllImport("user32")] public static extern int OemToChar(string lpszSrc, string lpszDst);
    787.         [DllImport("user32")] public static extern int OemToCharBuff(string lpszSrc, string lpszDst, int cchDstLength);
    788.         [DllImport("user32")] public static extern int OffsetRect(ref RECT lpRect, int x, int y);
    789.         [DllImport("user32")] public static extern int OpenClipboard(HWND hwnd);
    790.         [DllImport("user32")] public static extern int OpenDesktop(string lpszDesktop, int dwFlags, int fInherit, int dwDesiredAccess);
    791.         [DllImport("user32")] public static extern int OpenIcon(HWND hwnd);
    792.         [DllImport("user32")] public static extern int OpenInputDesktop(int dwFlags, int fInherit, int dwDesiredAccess);
    793.         [DllImport("user32")] public static extern int OpenWindowStation(string lpszWinSta, int fInherit, int dwDesiredAccess);
    794.         [DllImport("user32")] public static extern int PackDDElParam(int msg, int uiLo, int uiHi);
    795.         [DllImport("user32")] public static extern int PaintDesktop(HDC hdc);
    796.         [DllImport("user32")] public static extern int PeekMessage(ref MSG lpMsg, HWND hwnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg);
    797.         [DllImport("user32")] public static extern int PostMessage(HWND hwnd, int wMsg, int wParam, int lParam);
    798.         [DllImport("user32")] public static extern int PostThreadMessage(int idThread, int msg, int wParam, int lParam);
    799.         [DllImport("user32")] public static extern int PtInRect(ref RECT lpRect, int ptX, int ptY);
    800.         [DllImport("user32")] public static extern int RedrawWindow(HWND hwnd, ref RECT lprcUpdate, HANDLE hrgnUpdate, int fuRedraw);
    801.         [DllImport("user32")] public static extern int RegisterClass(ref WNDCLASS Class);
    802.         [DllImport("user32")] public static extern int RegisterClipboardFormat(string lpString);
    803.         [DllImport("user32")] public static extern int RegisterHotKey(HWND hwnd, int id, int fsModifiers, int vk);
    804.         [DllImport("user32")] public static extern int RegisterWindowMessage(string lpString);
    805.         [DllImport("user32")] public static extern int ReleaseCapture();
    806.         [DllImport("user32")] public static extern int ReleaseDC(HWND hwnd, HDC hdc);
    807.         [DllImport("user32")] public static extern int RemoveMenu(HANDLE hMenu, int nPosition, int wFlags);
    808.         [DllImport("user32")] public static extern int RemoveProp(HWND hwnd, string lpString);
    809.         [DllImport("user32")] public static extern int ReplyMessage(int lReply);
    810.         [DllImport("user32")] public static extern int ReuseDDElParam(int lParam, int msgIn, int msgOut, int uiLo, int uiHi);
    811.         [DllImport("user32")] public static extern int ScreenToClient(HWND hwnd, ref POINT lpPoint);
    812.         [DllImport("user32")] public static extern int ScrollDC(HDC hdc, int dx, int dy, ref RECT lprcScroll, ref RECT lprcClip, HANDLE hrgnUpdate, ref RECT lprcUpdate);
    813.         [DllImport("user32")] public static extern int ScrollWindow(HWND hwnd, int XAmount, int YAmount, ref RECT lpRect, ref RECT lpClipRect);
    814.         [DllImport("user32")] public static extern int ScrollWindowEx(HWND hwnd, int dx, int dy, ref RECT lprcScroll, ref RECT lprcClip, HANDLE hrgnUpdate, ref RECT lprcUpdate, int fuScroll);
    815.         [DllImport("user32")] public static extern int SendDlgItemMessage(HANDLE hDlg, int nIDDlgItem, int wMsg, int wParam, int lParam);
    816.         [DllImport("user32")] public static extern int SendMessage(HWND hwnd, int wMsg, int wParam, IntPtr lParam);
    817.         [DllImport("user32")] public static extern int SendMessageCallback(HWND hwnd, int msg, int wParam, int lParam, ref int lpResultCallBack, int dwData);
    818.         [DllImport("user32")] public static extern int SendMessageTimeout(HWND hwnd, int msg, int wParam, int lParam, int fuFlags, int uTimeout, ref int lpdwResult);
    819.         [DllImport("user32")] public static extern int SendNotifyMessage(HWND hwnd, int msg, int wParam, int lParam);
    820.         [DllImport("user32")] public static extern int SetActiveWindow(HWND hwnd);
    821.         [DllImport("user32")] public static extern int SetCapture(HWND hwnd);
    822.         [DllImport("user32")] public static extern int SetCaretBlinkTime(int wMSeconds);
    823.         [DllImport("user32")] public static extern int SetCaretPos(int x, int y);
    824.         [DllImport("user32")] public static extern int SetClassLong(HWND hwnd, int nIndex, int dwNewLong);
    825.         [DllImport("user32")] public static extern int SetClassWord(HWND hwnd, int nIndex, int wNewWord);
    826.         [DllImport("user32")] public static extern int SetClipboardData(int wFormat, HANDLE hMem);
    827.         [DllImport("user32")] public static extern int SetClipboardViewer(HWND hwnd);
    828.         [DllImport("user32")] public static extern int SetCursor(HANDLE hCursor);
    829.         [DllImport("user32")] public static extern int SetCursorPos(int x, int y);
    830.         [DllImport("user32")] public static extern int SetDlgItemInt(HANDLE hDlg, int nIDDlgItem, int wValue, int bSigned);
    831.         [DllImport("user32")] public static extern int SetDlgItemText(HANDLE hDlg, int nIDDlgItem, string lpString);
    832.         [DllImport("user32")] public static extern int SetDoubleClickTime(int wCount);
    833.         [DllImport("user32")] public static extern int SetFocus(HWND hwnd);
    834.         [DllImport("user32")] public static extern int SetForegroundWindow(HWND hwnd);
    835.         [DllImport("user32")] public static extern int SetKeyboardState(Byte lppbKeyState);
    836.         [DllImport("user32")] public static extern int SetMenu(HWND hwnd, HANDLE hMenu);
    837.         [DllImport("user32")] public static extern int SetMenuContextHelpId(HANDLE hMenu, int dw);
    838.         [DllImport("user32")] public static extern int SetMenuDefaultItem(HANDLE hMenu, int uItem, int fByPos);
    839.         [DllImport("user32")] public static extern int SetMenuItemBitmaps(HANDLE hMenu, int nPosition, int wFlags, HANDLE hBitmapUnchecked, HANDLE hBitmapChecked);
    840.         [DllImport("user32")] public static extern int SetMenuItemInfo(HANDLE hMenu, int un, bool b, ref MENUITEMINFO lpcMenuItemInfo);
    841.         [DllImport("user32")] public static extern int SetMessageExtraInfo(int lParam);
    842.         [DllImport("user32")] public static extern int SetMessageQueue(int cMessagesMax);
    843.         [DllImport("user32")] public static extern int SetParent(HWND hwndChild, HWND hwndNewParent);
    844.         [DllImport("user32")] public static extern int SetProcessWindowStation(HANDLE hWinSta);
    845.         [DllImport("user32")] public static extern int SetProp(HWND hwnd, string lpString, HANDLE hData);
    846.         [DllImport("user32")] public static extern int SetRect(ref RECT lpRect, int X1, int Y1, int X2, int Y2);
    847.         [DllImport("user32")] public static extern int SetRectEmpty(ref RECT lpRect);
    848.         [DllImport("user32")] public static extern int SetScrollInfo(HWND hwnd, int n, ref SCROLLINFO lpcScrollInfo, bool redraw);
    849.         [DllImport("user32")] public static extern int SetScrollPos(HWND hwnd, int nBar, int nPos, int bRedraw);
    850.         [DllImport("user32")] public static extern int SetScrollRange(HWND hwnd, int nBar, int nMinPos, int nMaxPos, int bRedraw);
    851.         [DllImport("user32")] public static extern int SetSysColors(int nChanges, ref int lpSysColor, ref int lpColorValues);
    852.         [DllImport("user32")] public static extern int SetSystemCursor(HANDLE hcur, int id);
    853.         [DllImport("user32")] public static extern int SetThreadDesktop(HANDLE hDesktop);
    854.         [DllImport("user32")] public static extern int SetTimer(HWND hwnd, int nIDEvent, int uElapse, ref int lpTimerFunc);
    855.         [DllImport("user32")] public static extern int SetUserObjectInformation(HANDLE hObj, int nIndex, IntPtr pvInfo, int nLength);
    856.         [DllImport("user32")] public static extern int SetUserObjectSecurity(HANDLE hObj, ref int pSIRequested, ref SECURITY_DESCRIPTOR pSd);
    857.         [DllImport("user32")] public static extern int SetWindowContextHelpId(HWND hwnd, int dw);
    858.         [DllImport("user32")] public static extern int SetWindowLong(HWND hwnd, int nIndex, int dwNewLong);
    859.         [DllImport("user32")] public static extern int SetWindowPlacement(HWND hwnd, ref WINDOWPLACEMENT lpwndpl);
    860.         [DllImport("user32")] public static extern int SetWindowPos(HWND hwnd, HWND hwndInsertAfter, int x, int y, int cx, int cy, int wFlags);
    861.         [DllImport("user32")] public static extern int SetWindowRgn(HWND hwnd, HANDLE hRgn, int bRedraw);
    862.         [DllImport("user32")] public static extern int SetWindowText(HWND hwnd, string lpString);
    863.         [DllImport("user32")] public static extern int SetWindowWord(HWND hwnd, int nIndex, int wNewWord);
    864.         [DllImport("user32")] public static extern int SetWindowsHook(int nFilterType, ref int pfnFilterProc);
    865.         [DllImport("user32")] public static extern int SetWindowsHookEx(int idHook, ref int lpfn, HANDLE hmod, int dwThreadId);
    866.         [DllImport("user32")] public static extern int ShowCaret(HWND hwnd);
    867.         [DllImport("user32")] public static extern int ShowCursor(int bShow);
    868.         [DllImport("user32")] public static extern int ShowOwnedPopups(HWND hwnd, int fShow);
    869.         [DllImport("user32")] public static extern int ShowScrollBar(HWND hwnd, int wBar, int bShow);
    870.         [DllImport("user32")] public static extern int ShowWindow(HWND hwnd, int nCmdShow);
    871.         [DllImport("user32")] public static extern int ShowWindowAsync(HWND hwnd, int nCmdShow);
    872.         [DllImport("user32")] public static extern int SubtractRect(ref RECT lprcDst, ref RECT lprcSrc1, ref RECT lprcSrc2);
    873.         [DllImport("user32")] public static extern int SwapMouseButton(int bSwap);
    874.         [DllImport("user32")] public static extern int SwitchDesktop(HANDLE hDesktop);
    875.         [DllImport("user32")] public static extern int SystemParametersInfo(int uAction, int uParam, ref IntPtr lpvParam, int fuWinIni);
    876.         [DllImport("user32")] public static extern int TabbedTextOut(HDC hdc, int x, int y, string lpString, int nCount, int nTabPositions, ref int lpnTabStopPositions, int nTabOrigin);
    877.         [DllImport("user32")] public static extern int ToAscii(int uVirtKey, int uScanCode, Byte lpbKeyState, ref int lpwTransKey, int fuState);
    878.         [DllImport("user32")] public static extern int ToAsciiEx(int uVirtKey, int uScanCode, Byte lpKeyState, short lpChar, int uFlags, int dwhkl);
    879.         [DllImport("user32")] public static extern int ToUnicode(int wVirtKey, int wScanCode, Byte lpKeyState, string pwszBuff, int cchBuff, int wFlags);
    880.         [DllImport("user32")] public static extern int TrackPopupMenu(HANDLE hMenu, int wFlags, int x, int y, int nReserved, HWND hwnd, ref RECT lprc);
    881.         [DllImport("user32")] public static extern int TrackPopupMenuEx(HANDLE hMenu, int un, int n1, int n2, HWND hwnd, ref TPMPARAMS lpTPMParams);
    882.         [DllImport("user32")] public static extern int TranslateAccelerator(HWND hwnd, HANDLE hAccTable, ref MSG lpMsg);
    883.         [DllImport("user32")] public static extern int TranslateMDISysAccel(HWND hwndClient, ref MSG lpMsg);
    884.         [DllImport("user32")] public static extern int TranslateMessage(ref MSG lpMsg);
    885.         [DllImport("user32")] public static extern int UnhookWindowsHook(int nCode, ref int pfnFilterProc);
    886.         [DllImport("user32")] public static extern int UnhookWindowsHookEx(HANDLE hHook);
    887.         [DllImport("user32")] public static extern int UnionRect(ref RECT lpDestRect, ref RECT lpSrc1Rect, ref RECT lpSrc2Rect);
    888.         [DllImport("user32")] public static extern int UnloadKeyboardLayout(HANDLE hKL);
    889.         [DllImport("user32")] public static extern int UnpackDDElParam(int msg, int lParam, ref int puiLo, ref int puiHi);
    890.         [DllImport("user32")] public static extern int UnregisterClass(string lpClassName, HANDLE hInstance);
    891.         [DllImport("user32")] public static extern int UnregisterHotKey(HWND hwnd, int id);
    892.         [DllImport("user32")] public static extern int UpdateWindow(HWND hwnd);
    893.         [DllImport("user32")] public static extern int ValidateRect(HWND hwnd, ref RECT lpRect);
    894.         [DllImport("user32")] public static extern int ValidateRgn(HWND hwnd, HANDLE hRgn);
    895.         [DllImport("user32")] public static extern int WaitForInputIdle(HANDLE hProcess, int dwMilliseconds);
    896.         [DllImport("user32")] public static extern int WaitMessage();
    897.         [DllImport("user32")] public static extern int WinHelp(HWND hwnd, string lpHelpFile, int wCommand, int dwData);
    898.         [DllImport("user32")] public static extern int WindowFromDC(HDC hdc);
    899.         [DllImport("user32")] public static extern int WindowFromPoint(int xPoint, int yPoint);
    900.         [DllImport("user32")] public static extern short CascadeWindows(HWND hwndParent, int wHow, ref RECT lpRect, int cKids, ref int lpkids);
    901.         [DllImport("user32")] public static extern short GetAsyncKeyState(int vKey);
    902.         [DllImport("user32")] public static extern short GetKeyState(int nVirtKey);
    903.         [DllImport("user32")] public static extern short GetWindowWord(HWND hwnd, int nIndex);
    904.         [DllImport("user32")] public static extern short RegisterClassEx(ref WNDCLASSEX pcWndClassEx);
    905.         [DllImport("user32")] public static extern short TileWindows(HWND hwndParent, int wHow, ref RECT lpRect, int cKids, ref int lpKids);
    906.         [DllImport("user32")] public static extern short VkKeyScan(Byte cChar);
    907.         [DllImport("user32")] public static extern short VkKeyScanEx(Byte ch, int dwhkl);
    908.         [DllImport("user32")] public static extern string CharLower(string lpsz);
    909.         [DllImport("user32")] public static extern string CharNext(string lpsz);
    910.         [DllImport("user32")] public static extern string CharPrev(string lpszStart, string lpszCurrent);
    911.         [DllImport("user32")] public static extern string CharUpper(string lpsz);
    912.         [DllImport("user32")] public static extern void PostQuitMessage(int nExitCode);
    913.         [DllImport("user32")] public static extern void keybd_event(Byte bVk, Byte bScan, int dwFlags, int dwExtraInfo);
    914.         [DllImport("user32")] public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo);
    915.         [DllImport("user32")] public static extern void SetDebugErrorLevel(int dwLevel);
    916.         [DllImport("user32")] public static extern void SetLastErrorEx(int dwErrCode, int dwType);

    917.         public const int APPCLASS_MASK = 0xF;
    918.         public const int APPCLASS_MONITOR = 0x1;
    919.         public const int APPCLASS_STANDARD = 0x0;
    920.         public const int APPCMD_CLIENTONLY = 0x10;
    921.         public const int APPCMD_FILTERINITS = 0x20;
    922.         public const int APPCMD_MASK = 0xFF0;
    923.         public const int BDR_INNER = 0xC;
    924.         public const int BDR_OUTER = 0x3;
    925.         public const int BDR_RAISED = 0x5;
    926.         public const int BDR_RAISEDINNER = 0x4;
    927.         public const int BDR_RAISEDOUTER = 0x1;
    928.         public const int BDR_SUNKEN = 0xA;
    929.         public const int BDR_SUNKENINNER = 0x8;
    930.         public const int BDR_SUNKENOUTER = 0x2;
    931.         public const int BF_ADJUST = 0x2000;
    932.         public const int BF_BOTTOM = 0x8;
    933.         public const int BF_BOTTOMLEFT = (BF_BOTTOM | BF_LEFT);
    934.         public const int BF_BOTTOMRIGHT = (BF_BOTTOM | BF_RIGHT);
    935.         public const int BF_DIAGONAL = 0x10;
    936.         public const int BF_DIAGONAL_ENDBOTTOMLEFT = (BF_DIAGONAL | BF_BOTTOM | BF_LEFT);
    937.         public const int BF_DIAGONAL_ENDBOTTOMRIGHT = (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT);
    938.         public const int BF_DIAGONAL_ENDTOPLEFT = (BF_DIAGONAL | BF_TOP | BF_LEFT);
    939.         public const int BF_DIAGONAL_ENDTOPRIGHT = (BF_DIAGONAL | BF_TOP | BF_RIGHT);
    940.         public const int BF_FLAT = 0x4000;
    941.         public const int BF_LEFT = 0x1;
    942.         public const int BF_MIDDLE = 0x800;
    943.         public const int BF_MONO = 0x8000;
    944.         public const int BF_RECT = (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM);
    945.         public const int BF_RIGHT = 0x4;
    946.         public const int BF_SOFT = 0x1000;
    947.         public const int BF_TOP = 0x2;
    948.         public const int BF_TOPLEFT = (BF_TOP | BF_LEFT);
    949.         public const int BF_TOPRIGHT = (BF_TOP | BF_RIGHT);
    950.         public const int BIF_BROWSEFORCOMPUTER = 4096;
    951.         public const int BIF_BROWSEFORPRINTER = 8192;
    952.         public const int BIF_BROWSEINCLUDEFILES = 16384;
    953.         public const int BIF_BROWSEINCLUDEURLS = 128;
    954.         public const int BIF_DONTGOBELOWDOMAIN = 2;
    955.         public const int BIF_EDITBOX = 16;
    956.         public const int BIF_RETURNFSANCESTORS = 8;
    957.         public const int BIF_RETURNONLYFSDIRS = 1;
    958.         public const int BIF_SHAREABLE = 32768;
    959.         public const int BIF_STATUSTEXT = 4;
    960.         public const int BIF_USENEWUI = 64;
    961.         public const int BIF_VALIDATE = 32;
    962.         public const int BM_GETCHECK = 0xF0;
    963.         public const int BM_GETSTATE = 0xF2;
    964.         public const int BM_SETCHECK = 0xF1;
    965.         public const int BM_SETSTATE = 0xF3;
    966.         public const int BM_SETSTYLE = 0xF4;
    967.         public const int BN_CLICKED = 0;
    968.         public const int BN_DISABLE = 4;
    969.         public const int BN_DOUBLECLICKED = 5;
    970.         public const int BN_HILITE = 2;
    971.         public const int BN_PAINT = 1;
    972.         public const int BN_UNHILITE = 3;
    973.         public const int BS_3STATE = 0x5;
    974.         public const int BS_AUTO3STATE = 0x6;
    975.         public const int BS_AUTOCHECKBOX = 0x3;
    976.         public const int BS_AUTORADIOBUTTON = 0x9;
    977.         public const int BS_CHECKBOX = 0x2;
    978.         public const int BS_DEFPUSHBUTTON = 0x1;
    979.         public const int BS_GROUPBOX = 0x7;
    980.         public const int BS_LEFTTEXT = 0x20;
    981.         public const int BS_OWNERDRAW = 0xB;
    982.         public const int BS_PUSHBUTTON = 0x0;
    983.         public const int BS_RADIOBUTTON = 0x4;
    984.         public const int BS_USERBUTTON = 0x8;
    985.         public const int CADV_LATEACK = 0xFFFF;
    986.         public const int CBF_FAIL_ADVISES = 0x4000;
    987.         public const int CBF_FAIL_ALLSVRXACTIONS = 0x3F000;
    988.         public const int CBF_FAIL_CONNECTIONS = 0x2000;
    989.         public const int CBF_FAIL_EXECUTES = 0x8000;
    990.         public const int CBF_FAIL_POKES = 0x10000;
    991.         public const int CBF_FAIL_REQUESTS = 0x20000;
    992.         public const int CBF_FAIL_SELFCONNECTIONS = 0x1000;
    993.         public const int CBF_SKIP_ALLNOTIFICATIONS = 0x3C0000;
    994.         public const int CBF_SKIP_CONNECT_CONFIRMS = 0x40000;
    995.         public const int CBF_SKIP_DISCONNECTS = 0x200000;
    996.         public const int CBF_SKIP_REGISTRATIONS = 0x80000;
    997.         public const int CBF_SKIP_UNREGISTRATIONS = 0x100000;
    998.         public const int CBN_CLOSEUP = 8;
    999.         public const int CBN_DBLCLK = 2;
    1000.         public const int CBN_DROPDOWN = 7;
    1001.         public const int CBN_EDITCHANGE = 5;
    1002.         public const int CBN_EDITUPDATE = 6;
    1003.         public const int CBN_ERRSPACE = (-1);
    1004.         public const int CBN_KILLFOCUS = 4;
    1005.         public const int CBN_SELCHANGE = 1;
    1006.         public const int CBN_SELENDCANCEL = 10;
    1007.         public const int CBN_SELENDOK = 9;
    1008.         public const int CBN_SETFOCUS = 3;
    1009.         public const int CBR_BLOCK = 0xFFFF;
    1010.         public const int CBS_AUTOHSCROLL = 0x40;
    1011.         public const int CBS_DISABLENOSCROLL = 0x800;
    1012.         public const int CBS_DROPDOWN = 0x2;
    1013.         public const int CBS_DROPDOWNLIST = 0x3;
    1014.         public const int CBS_HASSTRINGS = 0x200;
    1015.         public const int CBS_NOINTEGRALHEIGHT = 0x400;
    1016.         public const int CBS_OEMCONVERT = 0x80;
    1017.         public const int CBS_OWNERDRAWFIXED = 0x10;
    1018.         public const int CBS_OWNERDRAWVARIABLE = 0x20;
    1019.         public const int CBS_SIMPLE = 0x1;
    1020.         public const int CBS_SORT = 0x100;
    1021.         public const int CB_ADDSTRING = 0x143;
    1022.         public const int CB_DELETESTRING = 0x144;
    1023.         public const int CB_DIR = 0x145;
    1024.         public const int CB_ERR = (-1);
    1025.         public const int CB_ERRSPACE = (-2);
    1026.         public const int CB_FINDSTRING = 0x14C;
    1027.         public const int CB_FINDSTRINGEXACT = 0x158;
    1028.         public const int CB_GETCOUNT = 0x146;
    1029.         public const int CB_GETCURSEL = 0x147;
    1030.         public const int CB_GETDROPPEDCONTROLRECT = 0x152;
    1031.         public const int CB_GETDROPPEDSTATE = 0x157;
    1032.         public const int CB_GETEDITSEL = 0x140;
    1033.         public const int CB_GETEXTENDEDUI = 0x156;
    1034.         public const int CB_GETITEMDATA = 0x150;
    1035.         public const int CB_GETITEMHEIGHT = 0x154;
    1036.         public const int CB_GETLBTEXT = 0x148;
    1037.         public const int CB_GETLBTEXTLEN = 0x149;
    1038.         public const int CB_GETLOCALE = 0x15A;
    1039.         public const int CB_INSERTSTRING = 0x14A;
    1040.         public const int CB_LIMITTEXT = 0x141;
    1041.         public const int CB_MSGMAX = 0x15B;
    1042.         public const int CB_OKAY = 0;
    1043.         public const int CB_RESETCONTENT = 0x14B;
    1044.         public const int CB_SELECTSTRING = 0x14D;
    1045.         public const int CB_SETCURSEL = 0x14E;
    1046.         public const int CB_SETEDITSEL = 0x142;
    1047.         public const int CB_SETEXTENDEDUI = 0x155;
    1048.         public const int CB_SETITEMDATA = 0x151;
    1049.         public const int CB_SETITEMHEIGHT = 0x153;
    1050.         public const int CB_SETLOCALE = 0x159;
    1051.         public const int CB_SHOWDROPDOWN = 0x14F;
    1052.         public const int CF_BITMAP = 2;
    1053.         public const int CF_DIB = 8;
    1054.         public const int CF_DIF = 5;
    1055.         public const int CF_DSPBITMAP = 0x82;
    1056.         public const int CF_DSPENHMETAFILE = 0x8E;
    1057.         public const int CF_DSPMETAFILEPICT = 0x83;
    1058.         public const int CF_DSPTEXT = 0x81;
    1059.         public const int CF_ENHMETAFILE = 14;
    1060.         public const int CF_GDIOBJFIRST = 0x300;
    1061.         public const int CF_GDIOBJLAST = 0x3FF;
    1062.         public const int CF_METAFILEPICT = 3;
    1063.         public const int CF_OEMTEXT = 7;
    1064.         public const int CF_OWNERDISPLAY = 0x80;
    1065.         public const int CF_PALETTE = 9;
    1066.         public const int CF_PENDATA = 10;
    1067.         public const int CF_PRIVATEFIRST = 0x200;
    1068.         public const int CF_PRIVATELAST = 0x2FF;
    1069.         public const int CF_RIFF = 11;
    1070.         public const int CF_SYLK = 4;
    1071.         public const int CF_TEXT = 1;
    1072.         public const int CF_TIFF = 6;
    1073.         public const int CF_UNICODETEXT = 13;
    1074.         public const int CF_WAVE = 12;
    1075.         public const int CN_EVENT = 0x4;
    1076.         public const int CN_RECEIVE = 0x1;
    1077.         public const int CN_TRANSMIT = 0x2;
    1078.         public const int COLOR_ACTIVEBORDER = 10;
    1079.         public const int COLOR_ACTIVECAPTION = 2;
    1080.         public const int COLOR_APPWORKSPACE = 12;
    1081.         public const int COLOR_BACKGROUND = 1;
    1082.         public const int COLOR_BTNFACE = 15;
    1083.         public const int COLOR_BTNHIGHLIGHT = 20;
    1084.         public const int COLOR_BTNSHADOW = 16;
    1085.         public const int COLOR_BTNTEXT = 18;
    1086.         public const int COLOR_CAPTIONTEXT = 9;
    1087.         public const int COLOR_GRAYTEXT = 17;
    1088.         public const int COLOR_HIGHLIGHT = 13;
    1089.         public const int COLOR_HIGHLIGHTTEXT = 14;
    1090.         public const int COLOR_INACTIVEBORDER = 11;
    1091.         public const int COLOR_INACTIVECAPTION = 3;
    1092.         public const int COLOR_INACTIVECAPTIONTEXT = 19;
    1093.         public const int COLOR_MENU = 4;
    1094.         public const int COLOR_MENUTEXT = 7;
    1095.         public const int COLOR_SCROLLBAR = 0;
    1096.         public const int COLOR_WINDOW = 5;
    1097.         public const int COLOR_WINDOWFRAME = 6;
    1098.         public const int COLOR_WINDOWTEXT = 8;
    1099.         public const int CP_WINANSI = 1004;
    1100.         public const int CP_WINUNICODE = 1200;
    1101.         public const int CS_BYTEALIGNCLIENT = 0x1000;
    1102.         public const int CS_BYTEALIGNWINDOW = 0x2000;
    1103.         public const int CS_CLASSDC = 0x40;
    1104.         public const int CS_DBLCLKS = 0x8;
    1105.         public const int CS_HREDRAW = 0x2;
    1106.         public const int CS_KEYCVTWINDOW = 0x4;
    1107.         public const int CS_NOCLOSE = 0x200;
    1108.         public const int CS_NOKEYCVT = 0x100;
    1109.         public const int CS_OWNDC = 0x20;
    1110.         public const int CS_PARENTDC = 0x80;
    1111.         public const int CS_PUBLICCLASS = 0x4000;
    1112.         public const int CS_SAVEBITS = 0x800;
    1113.         public const int CS_VREDRAW = 0x1;
    1114.         public const int CTLCOLOR_BTN = 3;
    1115.         public const int CTLCOLOR_DLG = 4;
    1116.         public const int CTLCOLOR_EDIT = 1;
    1117.         public const int CTLCOLOR_LISTBOX = 2;
    1118.         public const int CTLCOLOR_MAX = 8;
    1119.         public const int CTLCOLOR_MSGBOX = 0;
    1120.         public const int CTLCOLOR_SCROLLBAR = 5;
    1121.         public const int CTLCOLOR_STATIC = 6;
    1122.         public const int CW_USEDEFAULT = unchecked((int)0x80000000);
    1123.         public const int DCX_CACHE = 0x2;
    1124.         public const int DCX_CLIPCHILDREN = 0x8;
    1125.         public const int DCX_CLIPSIBLINGS = 0x10;
    1126.         public const int DCX_EXCLUDERGN = 0x40;
    1127.         public const int DCX_EXCLUDEUPDATE = 0x100;
    1128.         public const int DCX_INTERSECTRGN = 0x80;
    1129.         public const int DCX_INTERSECTUPDATE = 0x200;
    1130.         public const int DCX_LOCKWINDOWUPDATE = 0x400;
    1131.         public const int DCX_NORECOMPUTE = 0x100000;
    1132.         public const int DCX_NORESETATTRS = 0x4;
    1133.         public const int DCX_PARENTCLIP = 0x20;
    1134.         public const int DCX_VALIDATE = 0x200000;
    1135.         public const int DCX_WINDOW = 0x1;
    1136.         public const int DC_HASDEFID = 0x534;
    1137.         public const int DDE_FACK = 0x8000;
    1138.         public const int DDE_FACKREQ = 0x8000;
    1139.         public const int DDE_FACKRESERVED = (~ (DDE_FACK | DDE_FBUSY | DDE_FAPPSTATUS));
    1140.         public const int DDE_FADVRESERVED = (~ (DDE_FACKREQ | DDE_FDEFERUPD));
    1141.         public const int DDE_FAPPSTATUS = 0xFF;
    1142.         public const int DDE_FBUSY = 0x4000;
    1143.         public const int DDE_FDATRESERVED = (~ (DDE_FACKREQ | DDE_FRELEASE | DDE_FREQUESTED));
    1144.         public const int DDE_FDEFERUPD = 0x4000;
    1145.         public const int DDE_FNOTPROCESSED = 0x0;
    1146.         public const int DDE_FPOKRESERVED = (~ (DDE_FRELEASE));
    1147.         public const int DDE_FRELEASE = 0x2000;
    1148.         public const int DDE_FREQUESTED = 0x1000;
    1149.         public const int DDL_ARCHIVE = 0x20;
    1150.         public const int DDL_DIRECTORY = 0x10;
    1151.         public const int DDL_DRIVES = 0x4000;
    1152.         public const int DDL_EXCLUSIVE = 0x8000;
    1153.         public const int DDL_HIDDEN = 0x2;
    1154.         public const int DDL_POSTMSGS = 0x2000;
    1155.         public const int DDL_READONLY = 0x1;
    1156.         public const int DDL_READWRITE = 0x0;
    1157.         public const int DDL_SYSTEM = 0x4;
    1158.         public const int DESKTOP_CREATEMENU = 0x4;
    1159.         public const int DESKTOP_CREATEWINDOW = 0x2;
    1160.         public const int DESKTOP_ENUMERATE = 0x40;
    1161.         public const int DESKTOP_HOOKCONTROL = 0x8;
    1162.         public const int DESKTOP_JOURNALPLAYBACK = 0x20;
    1163.         public const int DESKTOP_JOURNALRECORD = 0x10;
    1164.         public const int DESKTOP_READOBJECTS = 0x1;
    1165.         public const int DESKTOP_WRITEOBJECTS = 0x80;
    1166.         public const int DLGC_BUTTON = 0x2000;
    1167.         public const int DLGC_DEFPUSHBUTTON = 0x10;
    1168.         public const int DLGC_HASSETSEL = 0x8;
    1169.         public const int DLGC_RADIOBUTTON = 0x40;
    1170.         public const int DLGC_STATIC = 0x100;
    1171.         public const int DLGC_UNDEFPUSHBUTTON = 0x20;
    1172.         public const int DLGC_WANTALLKEYS = 0x4;
    1173.         public const int DLGC_WANTARROWS = 0x1;
    1174.         public const int DLGC_WANTCHARS = 0x80;
    1175.         public const int DLGC_WANTMESSAGE = 0x4;
    1176.         public const int DLGC_WANTTAB = 0x2;
    1177.         public const int DLGWINDOWEXTRA = 30;
    1178.         public const int DMLERR_ADVACKTIMEOUT = 0x4000;
    1179.         public const int DMLERR_BUSY = 0x4001;
    1180.         public const int DMLERR_DATAACKTIMEOUT = 0x4002;
    1181.         public const int DMLERR_DLL_NOT_INITIALIZED = 0x4003;
    1182.         public const int DMLERR_DLL_USAGE = 0x4004;
    1183.         public const int DMLERR_EXECACKTIMEOUT = 0x4005;
    1184.         public const int DMLERR_FIRST = 0x4000;
    1185.         public const int DMLERR_INVALIDPARAMETER = 0x4006;
    1186.         public const int DMLERR_LAST = 0x4011;
    1187.         public const int DMLERR_LOW_MEMORY = 0x4007;
    1188.         public const int DMLERR_MEMORY_ERROR = 0x4008;
    1189.         public const int DMLERR_NOTPROCESSED = 0x4009;
    1190.         public const int DMLERR_NO_CONV_ESTABLISHED = 0x400A;
    1191.         public const int DMLERR_NO_ERROR = 0;
    1192.         public const int DMLERR_POKEACKTIMEOUT = 0x400B;
    1193.         public const int DMLERR_POSTMSG_FAILED = 0x400C;
    1194.         public const int DMLERR_REENTRANCY = 0x400D;
    1195.         public const int DMLERR_SERVER_DIED = 0x400E;
    1196.         public const int DMLERR_SYS_ERROR = 0x400F;
    1197.         public const int DMLERR_UNADVACKTIMEOUT = 0x4010;
    1198.         public const int DMLERR_UNFOUND_QUEUE_ID = 0x4011;
    1199.         public const int DM_GETDEFID = WM_USER + 0;
    1200.         public const int DM_SETDEFID = WM_USER + 1;
    1201.         public const int DNS_FILTEROFF = 0x8;
    1202.         public const int DNS_FILTERON = 0x4;
    1203.         public const int DNS_REGISTER = 0x1;
    1204.         public const int DNS_UNREGISTER = 0x2;
    1205.         public const int DS_ABSALIGN = 0x1;
    1206.         public const int DS_LOCALEDIT = 0x20;
    1207.         public const int DS_MODALFRAME = 0x80;
    1208.         public const int DS_NOIDLEMSG = 0x100;
    1209.         public const int DS_SETFONT = 0x40;
    1210.         public const int DS_SETFOREGROUND = 0x200;
    1211.         public const int DS_SYSMODAL = 0x2;
    1212.         public const int DT_BOTTOM = 0x8;
    1213.         public const int DT_CALCRECT = 0x400;
    1214.         public const int DT_CENTER = 0x1;
    1215.         public const int DT_EDITCONTROL = 0x2000;
    1216.         public const int DT_END_ELLIPSIS = 0x8000;
    1217.         public const int DT_EXPANDTABS = 0x40;
    1218.         public const int DT_EXTERNALLEADING = 0x200;
    1219.         public const int DT_INTERNAL = 0x1000;
    1220.         public const int DT_LEFT = 0x0;
    1221.         public const int DT_MODIFYSTRING = 0x10000;
    1222.         public const int DT_NOCLIP = 0x100;
    1223.         public const int DT_NOPREFIX = 0x800;
    1224.         public const int DT_PATH_ELLIPSIS = 0x4000;
    1225.         public const int DT_RIGHT = 0x2;
    1226.         public const int DT_RTLREADING = 0x20000;
    1227.         public const int DT_SINGLELINE = 0x20;
    1228.         public const int DT_TABSTOP = 0x80;
    1229.         public const int DT_TOP = 0x0;
    1230.         public const int DT_VCENTER = 0x4;
    1231.         public const int DT_WORDBREAK = 0x10;
    1232.         public const int DT_WORD_ELLIPSIS = 0x40000;
    1233.         public const int DWL_DLGPROC = 4;
    1234.         public const int DWL_MSGRESULT = 0;
    1235.         public const int DWL_USER = 8;
    1236.         public const int EC_DISABLE = ST_BLOCKED;
    1237.         public const int EC_ENABLEALL = 0;
    1238.         public const int EC_ENABLEONE = ST_BLOCKNEXT;
    1239.         public const int EC_QUERYWAITING = 2;
    1240.         public const int EDGE_BUMP = (BDR_RAISEDOUTER | BDR_SUNKENINNER);
    1241.         public const int EDGE_ETCHED = (BDR_SUNKENOUTER | BDR_RAISEDINNER);
    1242.         public const int EDGE_RAISED = (BDR_RAISEDOUTER | BDR_RAISEDINNER);
    1243.         public const int EDGE_SUNKEN = (BDR_SUNKENOUTER | BDR_SUNKENINNER);
    1244.         public const int EM_CANPASTE = 0x432;
    1245.         public const int EM_CANREDO = 0x455;
    1246.         public const int EM_CANUNDO = 0xC6;
    1247.         public const int EM_CHARFROMPOS = 0x427;
    1248.         public const int EM_DISPLAYBAND = 0x433;
    1249.         public const int EM_EMPTYUNDOBUFFER = 0xCD;
    1250.         public const int EM_EXGETSEL = 0x434;
    1251.         public const int EM_EXLIMITTEXT = 0x435;
    1252.         public const int EM_EXLINEFROMCHAR = 0x436;
    1253.         public const int EM_EXSETSEL = 0x437;
    1254.         public const int EM_FINDTEXT = 0x438;
    1255.         public const int EM_FINDTEXTEX = 0x44F;
    1256.         public const int EM_FINDWORDBREAK = 0x44C;
    1257.         public const int EM_FMTLINES = 0xC8;
    1258.         public const int EM_FORMATRANGE = 0x439;
    1259.         public const int EM_GETCHARFORMAT = 0x43A;
    1260.         public const int EM_GETEVENTMASK = 0x43B;
    1261.         public const int EM_GETFIRSTVISIBLELINE = 0xCE;
    1262.         public const int EM_GETLIMITTEXT = 0x425;
    1263.         public const int EM_GETLINE = 0xC4;
    1264.         public const int EM_GETLINECOUNT = 0xBA;
    1265.         public const int EM_GETMODIFY = 0xB8;
    1266.         public const int EM_GETOLEINTERFACE = 0x43C;
    1267.         public const int EM_GETOPTIONS = 0x44E;
    1268.         public const int EM_GETPARAFORMAT = 0x43D;
    1269.         public const int EM_GETPASSWORDCHAR = 0xD2;
    1270.         public const int EM_GETRECT = 0xB2;
    1271.         public const int EM_GETREDONAME = 0x457;
    1272.         public const int EM_GETSEL = 0xB0;
    1273.         public const int EM_GETSELTEXT = 0x43E;
    1274.         public const int EM_GETTEXTMODE = 0x45A;
    1275.         public const int EM_GETTEXTRANGE = 0x44B;
    1276.         public const int EM_GETTHUMB = 0xBE;
    1277.         public const int EM_GETUNDONAME = 0x456;
    1278.         public const int EM_GETWORDBREAKPROC = 0xD1;
    1279.         public const int EM_HIDESELECTION = 0x43F;
    1280.         public const int EM_LIMITTEXT = 0xC5;
    1281.         public const int EM_LINEFROMCHAR = 0xC9;
    1282.         public const int EM_LINEINDEX = 0xBB;
    1283.         public const int EM_LINELENGTH = 0xC1;
    1284.         public const int EM_LINESCROLL = 0xB6;
    1285.         public const int EM_PASTESPECIAL = 0x440;
    1286.         public const int EM_POSFROMCHAR = 0x426;
    1287.         public const int EM_REDO = 0x454;
    1288.         public const int EM_REPLACESEL = 0xC2;
    1289.         public const int EM_REQUESTRESIZE = 0x441;
    1290.         public const int EM_SCROLL = 0xB5;
    1291.         public const int EM_SCROLLCARET = 0xB7;
    1292.         public const int EM_SELECTIONTYPE = 0x442;
    1293.         public const int EM_SETBKGNDCOLOR = 0x443;
    1294.         public const int EM_SETCHARFORMAT = 0x444;
    1295.         public const int EM_SETEVENTMASK = 0x445;
    1296.         public const int EM_SETMODIFY = 0xB9;
    1297.         public const int EM_SETOLECALLBACK = 0x446;
    1298.         public const int EM_SETOPTIONS = 0x44D;
    1299.         public const int EM_SETPARAFORMAT = 0x447;
    1300.         public const int EM_SETPASSWORDCHAR = 0xCC;
    1301.         public const int EM_SETREADONLY = 0xCF;
    1302.         public const int EM_SETRECT = 0xB3;
    1303.         public const int EM_SETRECTNP = 0xB4;
    1304.         public const int EM_SETSEL = 0xB1;
    1305.         public const int EM_SETTABSTOPS = 0xCB;
    1306.         public const int EM_SETTARGETDEVICE = 0x448;
    1307.         public const int EM_SETTEXTMODE = 0x459;
    1308.         public const int EM_SETUNDOLIMIT = 0x452;
    1309.         public const int EM_SETWORDBREAKPROC = 0xD0;
    1310.         public const int EM_STOPGROUPTYPING = 0x458;
    1311.         public const int EM_STREAMIN = 0x449;
    1312.         public const int EM_STREAMOUT = 0x44A;
    1313.         public const int EM_UNDO = 0xC7;
    1314.         public const int EN_CHANGE = 0x300;
    1315.         public const int EN_ERRSPACE = 0x500;
    1316.         public const int EN_HSCROLL = 0x601;
    1317.         public const int EN_KILLFOCUS = 0x200;
    1318.         public const int EN_MAXTEXT = 0x501;
    1319.         public const int EN_SETFOCUS = 0x100;
    1320.         public const int EN_UPDATE = 0x400;
    1321.         public const int EN_VSCROLL = 0x602;
    1322.         public const int ESB_DISABLE_BOTH = 0x3;
    1323.         public const int ESB_DISABLE_DOWN = 0x2;
    1324.         public const int ESB_DISABLE_LEFT = 0x1;
    1325.         public const int ESB_DISABLE_LTUP = ESB_DISABLE_LEFT;
    1326.         public const int ESB_DISABLE_RIGHT = 0x2;
    1327.         public const int ESB_DISABLE_RTDN = ESB_DISABLE_RIGHT;
    1328.         public const int ESB_DISABLE_UP = 0x1;
    1329.         public const int ESB_ENABLE_BOTH = 0x0;
    1330.         public const int ES_AUTOHSCROLL = 0x80;
    1331.         public const int ES_AUTOVSCROLL = 0x40;
    1332.         public const int ES_CENTER = 0x1;
    1333.         public const int ES_LEFT = 0x0;
    1334.         public const int ES_LOWERCASE = 0x10;
    1335.         public const int ES_MULTILINE = 0x4;
    1336.         public const int ES_NOHIDESEL = 0x100;
    1337.         public const int ES_OEMCONVERT = 0x400;
    1338.         public const int ES_PASSWORD = 0x20;
    1339.         public const int ES_READONLY = 0x800;
    1340.         public const int ES_RIGHT = 0x2;
    1341.         public const int ES_UPPERCASE = 0x8;
    1342.         public const int ES_WANTRETURN = 0x1000;
    1343.         public const int EWX_FORCE = 4;
    1344.         public const int EWX_LOGOFF = 0;
    1345.         public const int EWX_REBOOT = 2;
    1346.         public const int EWX_SHUTDOWN = 1;
    1347.         public const int FALT = 0x10;
    1348.         public const int FCONTROL = 0x8;
    1349.         public const int FNOINVERT = 0x2;
    1350.         public const int FSHIFT = 0x4;
    1351.         public const int FVIRTKEY = 0x1;
    1352.         public const int GCL_CBCLSEXTRA = (-20);
    1353.         public const int GCL_CBWNDEXTRA = (-18);
    1354.         public const int GCL_HBRBACKGROUND = (-10);
    1355.         public const int GCL_HCURSOR = (-12);
    1356.         public const int GCL_HICON = (-14);
    1357.         public const int GCL_HMODULE = (-16);
    1358.         public const int GCL_MENUNAME = (-8);
    1359.         public const int GCL_STYLE = (-26);
    1360.         public const int GCL_WNDPROC = (-24);
    1361.         public const int GCW_ATOM = (-32);
    1362.         public const int GWL_EXSTYLE = (-20);
    1363.         public const int GWL_HINSTANCE = (-6);
    1364.         public const int GWL_HWNDPARENT = (-8);
    1365.         public const int GWL_ID = (-12);
    1366.         public const int GWL_STYLE = (-16);
    1367.         public const int GWL_USERDATA = (-21);
    1368.         public const int GWL_WNDPROC = (-4);
    1369.         public const int GW_CHILD = 5;
    1370.         public const int GW_HWNDFIRST = 0;
    1371.         public const int GW_HWNDLAST = 1;
    1372.         public const int GW_HWNDNEXT = 2;
    1373.         public const int GW_HWNDPREV = 3;
    1374.         public const int GW_MAX = 5;
    1375.         public const int GW_OWNER = 4;
    1376.         public const int HCBT_ACTIVATE = 5;
    1377.         public const int HCBT_CLICKSKIPPED = 6;
    1378.         public const int HCBT_CREATEWND = 3;
    1379.         public const int HCBT_DESTROYWND = 4;
    1380.         public const int HCBT_KEYSKIPPED = 7;
    1381.         public const int HCBT_MINMAX = 1;
    1382.         public const int HCBT_MOVESIZE = 0;
    1383.         public const int HCBT_QS = 2;
    1384.         public const int HCBT_SETFOCUS = 9;
    1385.         public const int HCBT_SYSCOMMAND = 8;
    1386.         public const int HC_ACTION = 0;
    1387.         public const int HC_GETNEXT = 1;
    1388.         public const int HC_NOREM = HC_NOREMOVE;
    1389.         public const int HC_NOREMOVE = 3;
    1390.         public const int HC_SKIP = 2;
    1391.         public const int HC_SYSMODALOFF = 5;
    1392.         public const int HC_SYSMODALON = 4;
    1393.         public const int HDATA_APPOWNED = 0x1;
    1394.         public const int HELP_COMMAND = 0x102;
    1395.         public const int HELP_CONTENTS = 0x3;
    1396.         public const int HELP_CONTEXT = 0x1;
    1397.         public const int HELP_CONTEXTPOPUP = 0x8;
    1398.         public const int HELP_FORCEFILE = 0x9;
    1399.         public const int HELP_HELPONHELP = 0x4;
    1400.         public const int HELP_INDEX = 0x3;
    1401.         public const int HELP_KEY = 0x101;
    1402.         public const int HELP_MULTIKEY = 0x201;
    1403.         public const int HELP_PARTIALKEY = 0x105;
    1404.         public const int HELP_QUIT = 0x2;
    1405.         public const int HELP_SETCONTENTS = 0x5;
    1406.         public const int HELP_SETINDEX = 0x5;
    1407.         public const int HELP_SETWINPOS = 0x203;
    1408.         public const int HIDE_WINDOW = 0;
    1409.         public const int HKL_NEXT = 1;
    1410.         public const int HKL_PREV = 0;
    1411.         public const int HSHELL_ACTIVATESHELLWINDOW = 3;
    1412.         public const int HSHELL_WINDOWCREATED = 1;
    1413.         public const int HSHELL_WINDOWDESTROYED = 2;
    1414.         public const int HTBORDER = 18;
    1415.         public const int HTBOTTOM = 15;
    1416.         public const int HTBOTTOMLEFT = 16;
    1417.         public const int HTBOTTOMRIGHT = 17;
    1418.         public const int HTCAPTION = 2;
    1419.         public const int HTCLIENT = 1;
    1420.         public const int HTERROR = (-2);
    1421.         public const int HTGROWBOX = 4;
    1422.         public const int HTHSCROLL = 6;
    1423.         public const int HTLEFT = 10;
    1424.         public const int HTMAXBUTTON = 9;
    1425.         public const int HTMENU = 5;
    1426.         public const int HTMINBUTTON = 8;
    1427.         public const int HTNOWHERE = 0;
    1428.         public const int HTREDUCE = HTMINBUTTON;
    1429.         public const int HTRIGHT = 11;
    1430.         public const int HTSIZE = HTGROWBOX;
    1431.         public const int HTSIZEFIRST = HTLEFT;
    1432.         public const int HTSIZELAST = HTBOTTOMRIGHT;
    1433.         public const int HTSYSMENU = 3;
    1434.         public const int HTTOP = 12;
    1435.         public const int HTTOPLEFT = 13;
    1436.         public const int HTTOPRIGHT = 14;
    1437.         public const int HTTRANSPARENT = (-1);
    1438.         public const int HTVSCROLL = 7;
    1439.         public const int HTZOOM = HTMAXBUTTON;
    1440.         public HWND HWND_BOTTOM
    1441.         {
    1442.             get { return (HWND) 1; }
    1443.         }
    1444.         public HWND HWND_BROADCAST
    1445.         {
    1446.             get { return (HWND) 0xFFFF; }
    1447.         }
    1448.         public HWND HWND_DESKTOP
    1449.         {
    1450.             get { return (HWND) 0; }
    1451.         }
    1452.         public HWND HWND_TOP
    1453.         {
    1454.             get { return (HWND) 0; }
    1455.         }
    1456.         public HWND HWND_NOTOPMOST
    1457.         {
    1458.             get { return (HWND) (-2); }
    1459.         }
    1460.         public HWND HWND_TOPMOST
    1461.         {
    1462.             get { return (HWND) (-2); }
    1463.         }
    1464.         public const int IDABORT = 3;
    1465.         public const int IDCANCEL = 2;
    1466.         public const int IDC_APPSTARTING = 32650;
    1467.         public const int IDC_ARROW = 32512;
    1468.         public const int IDC_CROSS = 32515;
    1469.         public const int IDC_IBEAM = 32513;
    1470.         public const int IDC_ICON = 32641;
    1471.         public const int IDC_NO = 32648;
    1472.         public const int IDC_SIZE = 32640;
    1473.         public const int IDC_SIZEALL = 32646;
    1474.         public const int IDC_SIZENESW = 32643;
    1475.         public const int IDC_SIZENS = 32645;
    1476.         public const int IDC_SIZENWSE = 32642;
    1477.         public const int IDC_SIZEWE = 32644;
    1478.         public const int IDC_UPARROW = 32516;
    1479.         public const int IDC_WAIT = 32514;
    1480.         public const int IDHOT_SNAPDESKTOP = (-2);
    1481.         public const int IDHOT_SNAPWINDOW = (-1);
    1482.         public const int IDIGNORE = 5;
    1483.         public const int IDI_APPLICATION = 32512;
    1484.         public const int IDI_ASTERISK = 32516;
    1485.         public const int IDI_EXCLAMATION = 32515;
    1486.         public const int IDI_HAND = 32513;
    1487.         public const int IDI_QUESTION = 32514;
    1488.         public const int IDNO = 7;
    1489.         public const int IDOK = 1;
    1490.         public const int IDRETRY = 4;
    1491.         public const int IDYES = 6;
    1492.         public const int INVALID_HANDLE_VALUE = -1;
    1493.         public const int KEYEVENTF_EXTENDEDKEY = 0x1;
    1494.         public const int KEYEVENTF_KEYUP = 0x2;
    1495.         public const int KF_ALTDOWN = 0x2000;
    1496.         public const int KF_DLGMODE = 0x800;
    1497.         public const int KF_EXTENDED = 0x100;
    1498.         public const int KF_MENUMODE = 0x1000;
    1499.         public const int KF_REPEAT = 0x4000;
    1500.         public const int KF_UP = 0x8000;
    1501.         public const int KLF_ACTIVATE = 0x1;
    1502.         public const int KLF_REORDER = 0x8;
    1503.         public const int KLF_SUBSTITUTE_OK = 0x2;
    1504.         public const int KLF_UNLOADPREVIOUS = 0x4;
    1505.         public const int KL_NAMELENGTH = 9;
    1506.         public const int LBN_DBLCLK = 2;
    1507.         public const int LBN_ERRSPACE = (-2);
    1508.         public const int LBN_KILLFOCUS = 5;
    1509.         public const int LBN_SELCANCEL = 3;
    1510.         public const int LBN_SELCHANGE = 1;
    1511.         public const int LBN_SETFOCUS = 4;
    1512.         public const int LBS_DISABLENOSCROLL = 0x1000;
    1513.         public const int LBS_EXTENDEDSEL = 0x800;
    1514.         public const int LBS_HASSTRINGS = 0x40;
    1515.         public const int LBS_MULTICOLUMN = 0x200;
    1516.         public const int LBS_MULTIPLESEL = 0x8;
    1517.         public const int LBS_NODATA = 0x2000;
    1518.         public const int LBS_NOINTEGRALHEIGHT = 0x100;
    1519.         public const int LBS_NOREDRAW = 0x4;
    1520.         public const int LBS_NOTIFY = 0x1;
    1521.         public const int LBS_OWNERDRAWFIXED = 0x10;
    1522.         public const int LBS_OWNERDRAWVARIABLE = 0x20;
    1523.         public const int LBS_SORT = 0x2;
    1524.         public const int LBS_STANDARD = (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER);
    1525.         public const int LBS_USETABSTOPS = 0x80;
    1526.         public const int LBS_WANTKEYBOARDINPUT = 0x400;
    1527.         public const int LB_ADDFILE = 0x196;
    1528.         public const int LB_ADDSTRING = 0x180;
    1529.         public const int LB_CTLCODE = 0;
    1530.         public const int LB_DELETESTRING = 0x182;
    1531.         public const int LB_DIR = 0x18D;
    1532.         public const int LB_ERR = (-1);
    1533.         public const int LB_ERRSPACE = (-2);
    1534.         public const int LB_FINDSTRING = 0x18F;
    1535.         public const int LB_FINDSTRINGEXACT = 0x1A2;
    1536.         public const int LB_GETANCHORINDEX = 0x19D;
    1537.         public const int LB_GETCARETINDEX = 0x19F;
    1538.         public const int LB_GETCOUNT = 0x18B;
    1539.         public const int LB_GETCURSEL = 0x188;
    1540.         public const int LB_GETHORIZONTALEXTENT = 0x193;
    1541.         public const int LB_GETITEMDATA = 0x199;
    1542.         public const int LB_GETITEMHEIGHT = 0x1A1;
    1543.         public const int LB_GETITEMRECT = 0x198;
    1544.         public const int LB_GETLOCALE = 0x1A6;
    1545.         public const int LB_GETSEL = 0x187;
    1546.         public const int LB_GETSELCOUNT = 0x190;
    1547.         public const int LB_GETSELITEMS = 0x191;
    1548.         public const int LB_GETTEXT = 0x189;
    1549.         public const int LB_GETTEXTLEN = 0x18A;
    1550.         public const int LB_GETTOPINDEX = 0x18E;
    1551.         public const int LB_INSERTSTRING = 0x181;
    1552.         public const int LB_MSGMAX = 0x1A8;
    1553.         public const int LB_OKAY = 0;
    1554.         public const int LB_RESETCONTENT = 0x184;
    1555.         public const int LB_SELECTSTRING = 0x18C;
    1556.         public const int LB_SELITEMRANGE = 0x19B;
    1557.         public const int LB_SELITEMRANGEEX = 0x183;
    1558.         public const int LB_SETANCHORINDEX = 0x19C;
    1559.         public const int LB_SETCARETINDEX = 0x19E;
    1560.         public const int LB_SETCOLUMNWIDTH = 0x195;
    1561.         public const int LB_SETCOUNT = 0x1A7;
    1562.         public const int LB_SETCURSEL = 0x186;
    1563.         public const int LB_SETHORIZONTALEXTENT = 0x194;
    1564.         public const int LB_SETITEMDATA = 0x19A;
    1565.         public const int LB_SETITEMHEIGHT = 0x1A0;
    1566.         public const int LB_SETLOCALE = 0x1A5;
    1567.         public const int LB_SETSEL = 0x185;

    复制代码


    发帖求助前要善用论坛搜索功能,那里可能会有你要找的答案;

    如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子分类或者标题加上【已解决】

    如何回报帮助你解决问题的坛友,可以以【悬赏】的方式提问,伸手党遭人唾弃,做一个热心并受欢迎的人!

  • TA的每日心情
    奋斗
    2018-11-2 10:21
  • 签到天数: 21 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    10

    主题

    27

    帖子

    227

    积分

    Rank: 7Rank: 7Rank: 7

    积分
    227

    优质会员

     楼主| 发表于 2018-4-27 16:55:14 | 显示全部楼层
    接上面的User.cs
    1. public const int LB_SETTABSTOPS = 0x192;
    2. public const int LB_SETTOPINDEX = 0x197;
    3. public const int MAX_MONITORS = 4;
    4. public const int MA_ACTIVATE = 1;
    5. public const int MA_ACTIVATEANDEAT = 2;
    6. public const int MA_NOACTIVATE = 3;
    7. public const int MA_NOACTIVATEANDEAT = 4;
    8. public const int MB_ABORTRETRYIGNORE = 0x2;
    9. public const int MB_APPLMODAL = 0x0;
    10. public const int MB_DEFAULT_DESKTOP_ONLY = 0x20000;
    11. public const int MB_DEFBUTTON1 = 0x0;
    12. public const int MB_DEFBUTTON2 = 0x100;
    13. public const int MB_DEFBUTTON3 = 0x200;
    14. public const int MB_DEFMASK = 0xF00;
    15. public const int MB_ICONASTERISK = 0x40;
    16. public const int MB_ICONEXCLAMATION = 0x30;
    17. public const int MB_ICONHAND = 0x10;
    18. public const int MB_ICONINFORMATION = MB_ICONASTERISK;
    19. public const int MB_ICONMASK = 0xF0;
    20. public const int MB_ICONQUESTION = 0x20;
    21. public const int MB_ICONSTOP = MB_ICONHAND;
    22. public const int MB_MISCMASK = 0xC000;
    23. public const int MB_MODEMASK = 0x3000;
    24. public const int MB_NOFOCUS = 0x8000;
    25. public const int MB_OK = 0x0;
    26. public const int MB_OKCANCEL = 0x1;
    27. public const int MB_RETRYCANCEL = 0x5;
    28. public const int MB_SETFOREGROUND = 0x10000;
    29. public const int MB_SYSTEMMODAL = 0x1000;
    30. public const int MB_TASKMODAL = 0x2000;
    31. public const int MB_TYPEMASK = 0xF;
    32. public const int MB_YESNO = 0x4;
    33. public const int MB_YESNOCANCEL = 0x3;
    34. public const int MDIS_ALLCHILDSTYLES = 0x1;
    35. public const int MDITILE_HORIZONTAL = 0x1;
    36. public const int MDITILE_SKIPDISABLED = 0x2;
    37. public const int MDITILE_VERTICAL = 0x0;
    38. public const int MF_APPEND = 0x100;
    39. public const int MF_BITMAP = 0x4;
    40. public const int MF_BYCOMMAND = 0x0;
    41. public const int MF_BYPOSITION = 0x400;
    42. public const int MF_CALLBACKS = 0x8000000;
    43. public const int MF_CHANGE = 0x80;
    44. public const int MF_CHECKED = 0x8;
    45. public const int MF_CONV = 0x40000000;
    46. public const int MF_DELETE = 0x200;
    47. public const int MF_DISABLED = 0x2;
    48. public const int MF_ENABLED = 0x0;
    49. public const int MF_END = 0x80;
    50. public const int MF_ERRORS = 0x10000000;
    51. public const int MF_GRAYED = 0x1;
    52. public const int MF_HELP = 0x4000;
    53. public const int MF_HILITE = 0x80;
    54. public const int MF_HSZ_INFO = 0x1000000;
    55. public const int MF_INSERT = 0x0;
    56. public const int MF_LINKS = 0x20000000;
    57. public const int MF_MASK = unchecked((int)0xFF000000);
    58. public const int MF_MENUBARBREAK = 0x20;
    59. public const int MF_MENUBREAK = 0x40;
    60. public const int MF_MOUSESELECT = 0x8000;
    61. public const int MF_OWNERDRAW = 0x100;
    62. public const int MF_POPUP = 0x10;
    63. public const int MF_POSTMSGS = 0x4000000;
    64. public const int MF_REMOVE = 0x1000;
    65. public const int MF_SENDMSGS = 0x2000000;
    66. public const int MF_SEPARATOR = 0x800;
    67. public const int MF_STRING = 0x0;
    68. public const int MF_SYSMENU = 0x2000;
    69. public const int MF_UNCHECKED = 0x0;
    70. public const int MF_UNHILITE = 0x0;
    71. public const int MF_USECHECKBITMAPS = 0x200;
    72. public const int MH_CLEANUP = 4;
    73. public const int MH_CREATE = 1;
    74. public const int MH_DELETE = 3;
    75. public const int MH_KEEP = 2;
    76. public const int MK_CONTROL = 0x8;
    77. public const int MK_LBUTTON = 0x1;
    78. public const int MK_MBUTTON = 0x10;
    79. public const int MK_RBUTTON = 0x2;
    80. public const int MK_SHIFT = 0x4;
    81. public const int MOD_ALT = 0x1;
    82. public const int MOD_CONTROL = 0x2;
    83. public const int MOD_SHIFT = 0x4;
    84. public const int MOUSEEVENTF_ABSOLUTE = 0x8000;
    85. public const int MOUSEEVENTF_LEFTDOWN = 0x2;
    86. public const int MOUSEEVENTF_LEFTUP = 0x4;
    87. public const int MOUSEEVENTF_MIDDLEDOWN = 0x20;
    88. public const int MOUSEEVENTF_MIDDLEUP = 0x40;
    89. public const int MOUSEEVENTF_MOVE = 0x1;
    90. public const int MOUSEEVENTF_RIGHTDOWN = 0x8;
    91. public const int MOUSEEVENTF_RIGHTUP = 0x10;
    92. public const int MSGF_DDEMGR = 0x8001;
    93. public const int MSGF_DIALOGBOX = 0;
    94. public const int MSGF_MAINLOOP = 8;
    95. public const int MSGF_MAX = 8;
    96. public const int MSGF_MENU = 2;
    97. public const int MSGF_MESSAGEBOX = 1;
    98. public const int MSGF_MOVE = 3;
    99. public const int MSGF_NEXTWINDOW = 6;
    100. public const int MSGF_SCROLLBAR = 5;
    101. public const int MSGF_SIZE = 4;
    102. public const int MSGF_USER = 4096;
    103. public const int OBM_BTNCORNERS = 32758;
    104. public const int OBM_BTSIZE = 32761;
    105. public const int OBM_CHECK = 32760;
    106. public const int OBM_CHECKBOXES = 32759;
    107. public const int OBM_CLOSE = 32754;
    108. public const int OBM_COMBO = 32738;
    109. public const int OBM_DNARROW = 32752;
    110. public const int OBM_DNARROWD = 32742;
    111. public const int OBM_DNARROWI = 32736;
    112. public const int OBM_LFARROW = 32750;
    113. public const int OBM_LFARROWD = 32740;
    114. public const int OBM_LFARROWI = 32734;
    115. public const int OBM_MNARROW = 32739;
    116. public const int OBM_OLD_CLOSE = 32767;
    117. public const int OBM_OLD_DNARROW = 32764;
    118. public const int OBM_OLD_LFARROW = 32762;
    119. public const int OBM_OLD_REDUCE = 32757;
    120. public const int OBM_OLD_RESTORE = 32755;
    121. public const int OBM_OLD_RGARROW = 32763;
    122. public const int OBM_OLD_UPARROW = 32765;
    123. public const int OBM_OLD_ZOOM = 32756;
    124. public const int OBM_REDUCE = 32749;
    125. public const int OBM_REDUCED = 32746;
    126. public const int OBM_RESTORE = 32747;
    127. public const int OBM_RESTORED = 32744;
    128. public const int OBM_RGARROW = 32751;
    129. public const int OBM_RGARROWD = 32741;
    130. public const int OBM_RGARROWI = 32735;
    131. public const int OBM_SIZE = 32766;
    132. public const int OBM_UPARROW = 32753;
    133. public const int OBM_UPARROWD = 32743;
    134. public const int OBM_UPARROWI = 32737;
    135. public const int OBM_ZOOM = 32748;
    136. public const int OBM_ZOOMD = 32745;
    137. public const int OCR_CROSS = 32515;
    138. public const int OCR_IBEAM = 32513;
    139. public const int OCR_ICOCUR = 32647;
    140. public const int OCR_ICON = 32641;
    141. public const int OCR_NO = 32648;
    142. public const int OCR_NORMAL = 32512;
    143. public const int OCR_SIZE = 32640;
    144. public const int OCR_SIZEALL = 32646;
    145. public const int OCR_SIZENESW = 32643;
    146. public const int OCR_SIZENS = 32645;
    147. public const int OCR_SIZENWSE = 32642;
    148. public const int OCR_SIZEWE = 32644;
    149. public const int OCR_UP = 32516;
    150. public const int OCR_WAIT = 32514;
    151. public const int ODA_DRAWENTIRE = 0x1;
    152. public const int ODA_FOCUS = 0x4;
    153. public const int ODA_SELECT = 0x2;
    154. public const int ODS_CHECKED = 0x8;
    155. public const int ODS_DISABLED = 0x4;
    156. public const int ODS_FOCUS = 0x10;
    157. public const int ODS_GRAYED = 0x2;
    158. public const int ODS_SELECTED = 0x1;
    159. public const int ODT_BUTTON = 4;
    160. public const int ODT_COMBOBOX = 3;
    161. public const int ODT_LISTBOX = 2;
    162. public const int ODT_MENU = 1;
    163. public const int OIC_BANG = 32515;
    164. public const int OIC_HAND = 32513;
    165. public const int OIC_NOTE = 32516;
    166. public const int OIC_QUES = 32514;
    167. public const int OIC_SAMPLE = 32512;
    168. public const int ORD_LANGDRIVER = 1;
    169. public const int PAGE_EXECUTE = 0x10;
    170. public const int PAGE_EXECUTE_READ = 0x20;
    171. public const int PAGE_EXECUTE_READWRITE = 0x40;
    172. public const int PAGE_EXECUTE_WRITECOPY = 0x80;
    173. public const int PAGE_GUARD = 0x100;
    174. public const int PAGE_NOACCESS = 0x1;
    175. public const int PAGE_NOCACHE = 0x200;
    176. public const int PAGE_READONLY = 0x2;
    177. public const int PAGE_READWRITE = 0x4;
    178. public const int PAGE_WRITECOPY = 0x8;
    179. public const int PM_NOREMOVE = 0x0;
    180. public const int PM_NOYIELD = 0x2;
    181. public const int PM_REMOVE = 0x1;
    182. public const int PWR_CRITICALRESUME = 3;
    183. public const int PWR_FAIL = (-1);
    184. public const int PWR_OK = 1;
    185. public const int PWR_SUSPENDREQUEST = 1;
    186. public const int PWR_SUSPENDRESUME = 2;
    187. public const int QID_SYNC = 0xFFFF;
    188. public const int QS_ALLEVENTS = (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY);
    189. public const int QS_ALLINPUT = (QS_SENDMESSAGE | QS_PAINT | QS_TIMER | QS_POSTMESSAGE | QS_MOUSEBUTTON | QS_MOUSEMOVE | QS_HOTKEY | QS_KEY);
    190. public const int QS_HOTKEY = 0x80;
    191. public const int QS_INPUT = (QS_MOUSE | QS_KEY);
    192. public const int QS_KEY = 0x1;
    193. public const int QS_MOUSE = (QS_MOUSEMOVE | QS_MOUSEBUTTON);
    194. public const int QS_MOUSEBUTTON = 0x4;
    195. public const int QS_MOUSEMOVE = 0x2;
    196. public const int QS_PAINT = 0x20;
    197. public const int QS_POSTMESSAGE = 0x8;
    198. public const int QS_SENDMESSAGE = 0x40;
    199. public const int QS_TIMER = 0x10;
    200. public const int RDW_ALLCHILDREN = 0x80;
    201. public const int RDW_ERASE = 0x4;
    202. public const int RDW_ERASENOW = 0x200;
    203. public const int RDW_FRAME = 0x400;
    204. public const int RDW_INTERNALPAINT = 0x2;
    205. public const int RDW_INVALIDATE = 0x1;
    206. public const int RDW_NOCHILDREN = 0x40;
    207. public const int RDW_NOERASE = 0x20;
    208. public const int RDW_NOFRAME = 0x800;
    209. public const int RDW_NOINTERNALPAINT = 0x10;
    210. public const int RDW_UPDATENOW = 0x100;
    211. public const int RDW_VALIDATE = 0x8;
    212. public const int READ = 0;
    213. public const int READ_WRITE = 2;
    214. public const int SBM_ENABLE_ARROWS = 0xE4;
    215. public const int SBM_GETPOS = 0xE1;
    216. public const int SBM_GETRANGE = 0xE3;
    217. public const int SBM_SETPOS = 0xE0;
    218. public const int SBM_SETRANGE = 0xE2;
    219. public const int SBM_SETRANGEREDRAW = 0xE6;
    220. public const int SBS_BOTTOMALIGN = 0x4;
    221. public const int SBS_HORZ = 0x0;
    222. public const int SBS_LEFTALIGN = 0x2;
    223. public const int SBS_RIGHTALIGN = 0x4;
    224. public const int SBS_SIZEBOX = 0x8;
    225. public const int SBS_SIZEBOXBOTTOMRIGHTALIGN = 0x4;
    226. public const int SBS_SIZEBOXTOPLEFTALIGN = 0x2;
    227. public const int SBS_TOPALIGN = 0x2;
    228. public const int SBS_VERT = 0x1;
    229. public const int SB_BOTH = 3;
    230. public const int SB_BOTTOM = 7;
    231. public const int SB_CTL = 2;
    232. public const int SB_ENDSCROLL = 8;
    233. public const int SB_HORZ = 0;
    234. public const int SB_LEFT = 6;
    235. public const int SB_LINEDOWN = 1;
    236. public const int SB_LINELEFT = 0;
    237. public const int SB_LINERIGHT = 1;
    238. public const int SB_LINEUP = 0;
    239. public const int SB_PAGEDOWN = 3;
    240. public const int SB_PAGELEFT = 2;
    241. public const int SB_PAGERIGHT = 3;
    242. public const int SB_PAGEUP = 2;
    243. public const int SB_RIGHT = 7;
    244. public const int SB_THUMBPOSITION = 4;
    245. public const int SB_THUMBTRACK = 5;
    246. public const int SB_TOP = 6;
    247. public const int SB_VERT = 1;
    248. public const int SC_ARRANGE = 0xF110;
    249. public const int SC_CLOSE = 0xF060;
    250. public const int SC_HOTKEY = 0xF150;
    251. public const int SC_HSCROLL = 0xF080;
    252. public const int SC_ICON = SC_MINIMIZE;
    253. public const int SC_KEYMENU = 0xF100;
    254. public const int SC_MAXIMIZE = 0xF030;
    255. public const int SC_MINIMIZE = 0xF020;
    256. public const int SC_MOUSEMENU = 0xF090;
    257. public const int SC_MOVE = 0xF010;
    258. public const int SC_NEXTWINDOW = 0xF040;
    259. public const int SC_PREVWINDOW = 0xF050;
    260. public const int SC_RESTORE = 0xF120;
    261. public const int SC_SCREENSAVE = 0xF140;
    262. public const int SC_SIZE = 0xF000;
    263. public const int SC_TASKLIST = 0xF130;
    264. public const int SC_VSCROLL = 0xF070;
    265. public const int SC_ZOOM = SC_MAXIMIZE;
    266. public const int SHOW_FULLSCREEN = 3;
    267. public const int SHOW_ICONWINDOW = 2;
    268. public const int SHOW_OPENNOACTIVATE = 4;
    269. public const int SHOW_OPENWINDOW = 1;
    270. public const int SIZEFULLSCREEN = SIZE_MAXIMIZED;
    271. public const int SIZEICONIC = SIZE_MINIMIZED;
    272. public const int SIZENORMAL = SIZE_RESTORED;
    273. public const int SIZEZOOMHIDE = SIZE_MAXHIDE;
    274. public const int SIZEZOOMSHOW = SIZE_MAXSHOW;
    275. public const int SIZE_MAXHIDE = 4;
    276. public const int SIZE_MAXIMIZED = 2;
    277. public const int SIZE_MAXSHOW = 3;
    278. public const int SIZE_MINIMIZED = 1;
    279. public const int SIZE_RESTORED = 0;
    280. public const int SMTO_ABORTIFHUNG = 0x2;
    281. public const int SMTO_BLOCK = 0x1;
    282. public const int SMTO_NORMAL = 0x0;
    283. public const int SM_CMETRICS = 44;
    284. public const int SM_CMOUSEBUTTONS = 43;
    285. public const int SM_CXBORDER = 5;
    286. public const int SM_CXCURSOR = 13;
    287. public const int SM_CXDLGFRAME = 7;
    288. public const int SM_CXDOUBLECLK = 36;
    289. public const int SM_CXFIXEDFRAME = SM_CXDLGFRAME;
    290. public const int SM_CXFRAME = 32;
    291. public const int SM_CXFULLSCREEN = 16;
    292. public const int SM_CXHSCROLL = 21;
    293. public const int SM_CXHTHUMB = 10;
    294. public const int SM_CXICON = 11;
    295. public const int SM_CXICONSPACING = 38;
    296. public const int SM_CXMIN = 28;
    297. public const int SM_CXMINTRACK = 34;
    298. public const int SM_CXSCREEN = 0;
    299. public const int SM_CXSIZE = 30;
    300. public const int SM_CXSIZEFRAME = SM_CXFRAME;
    301. public const int SM_CXVSCROLL = 2;
    302. public const int SM_CYBORDER = 6;
    303. public const int SM_CYCAPTION = 4;
    304. public const int SM_CYCURSOR = 14;
    305. public const int SM_CYDLGFRAME = 8;
    306. public const int SM_CYDOUBLECLK = 37;
    307. public const int SM_CYFIXEDFRAME = SM_CYDLGFRAME;
    308. public const int SM_CYFRAME = 33;
    309. public const int SM_CYFULLSCREEN = 17;
    310. public const int SM_CYHSCROLL = 3;
    311. public const int SM_CYICON = 12;
    312. public const int SM_CYICONSPACING = 39;
    313. public const int SM_CYKANJIWINDOW = 18;
    314. public const int SM_CYMENU = 15;
    315. public const int SM_CYMIN = 29;
    316. public const int SM_CYMINTRACK = 35;
    317. public const int SM_CYSCREEN = 1;
    318. public const int SM_CYSIZE = 31;
    319. public const int SM_CYSIZEFRAME = SM_CYFRAME;
    320. public const int SM_CYVSCROLL = 20;
    321. public const int SM_CYVTHUMB = 9;
    322. public const int SM_DBCSENABLED = 42;
    323. public const int SM_DEBUG = 22;
    324. public const int SM_MENUDROPALIGNMENT = 40;
    325. public const int SM_MOUSEPRESENT = 19;
    326. public const int SM_PENWINDOWS = 41;
    327. public const int SM_RESERVED1 = 24;
    328. public const int SM_RESERVED2 = 25;
    329. public const int SM_RESERVED3 = 26;
    330. public const int SM_RESERVED4 = 27;
    331. public const int SM_SWAPBUTTON = 23;
    332. public const int SPIF_SENDWININICHANGE = 0x2;
    333. public const int SPIF_UPDATEINIFILE = 0x1;
    334. public const int SPI_GETACCESSTIMEOUT = 60;
    335. public const int SPI_GETANIMATION = 72;
    336. public const int SPI_GETBEEP = 1;
    337. public const int SPI_GETBORDER = 5;
    338. public const int SPI_GETDEFAULTINPUTLANG = 89;
    339. public const int SPI_GETDRAGFULLWINDOWS = 38;
    340. public const int SPI_GETFASTTASKSWITCH = 35;
    341. public const int SPI_GETFILTERKEYS = 50;
    342. public const int SPI_GETFONTSMOOTHING = 74;
    343. public const int SPI_GETGRIDGRANULARITY = 18;
    344. public const int SPI_GETHIGHCONTRAST = 66;
    345. public const int SPI_GETICONMETRICS = 45;
    346. public const int SPI_GETICONTITLELOGFONT = 31;
    347. public const int SPI_GETICONTITLEWRAP = 25;
    348. public const int SPI_GETKEYBOARDDELAY = 22;
    349. public const int SPI_GETKEYBOARDPREF = 68;
    350. public const int SPI_GETKEYBOARDSPEED = 10;
    351. public const int SPI_GETLOWPOWERACTIVE = 83;
    352. public const int SPI_GETLOWPOWERTIMEOUT = 79;
    353. public const int SPI_GETMENUDROPALIGNMENT = 27;
    354. public const int SPI_GETMINIMIZEDMETRICS = 43;
    355. public const int SPI_GETMOUSE = 3;
    356. public const int SPI_GETMOUSEKEYS = 54;
    357. public const int SPI_GETMOUSETRAILS = 94;
    358. public const int SPI_GETNONCLIENTMETRICS = 41;
    359. public const int SPI_GETPOWEROFFACTIVE = 84;
    360. public const int SPI_GETPOWEROFFTIMEOUT = 80;
    361. public const int SPI_GETSCREENREADER = 70;
    362. public const int SPI_GETSCREENSAVEACTIVE = 16;
    363. public const int SPI_GETSCREENSAVETIMEOUT = 14;
    364. public const int SPI_GETSERIALKEYS = 62;
    365. public const int SPI_GETSHOWSOUNDS = 56;
    366. public const int SPI_GETSOUNDSENTRY = 64;
    367. public const int SPI_GETSTICKYKEYS = 58;
    368. public const int SPI_GETTOGGLEKEYS = 52;
    369. public const int SPI_GETWINDOWSEXTENSION = 92;
    370. public const int SPI_GETWORKAREA = 48;
    371. public const int SPI_ICONHORIZONTALSPACING = 13;
    372. public const int SPI_ICONVERTICALSPACING = 24;
    373. public const int SPI_LANGDRIVER = 12;
    374. public const int SPI_SCREENSAVERRUNNING = 97;
    375. public const int SPI_SETACCESSTIMEOUT = 61;
    376. public const int SPI_SETANIMATION = 73;
    377. public const int SPI_SETBEEP = 2;
    378. public const int SPI_SETBORDER = 6;
    379. public const int SPI_SETCURSORS = 87;
    380. public const int SPI_SETDEFAULTINPUTLANG = 90;
    381. public const int SPI_SETDESKPATTERN = 21;
    382. public const int SPI_SETDESKWALLPAPER = 20;
    383. public const int SPI_SETDOUBLECLICKTIME = 32;
    384. public const int SPI_SETDOUBLECLKHEIGHT = 30;
    385. public const int SPI_SETDOUBLECLKWIDTH = 29;
    386. public const int SPI_SETDRAGFULLWINDOWS = 37;
    387. public const int SPI_SETDRAGHEIGHT = 77;
    388. public const int SPI_SETDRAGWIDTH = 76;
    389. public const int SPI_SETFASTTASKSWITCH = 36;
    390. public const int SPI_SETFILTERKEYS = 51;
    391. public const int SPI_SETFONTSMOOTHING = 75;
    392. public const int SPI_SETGRIDGRANULARITY = 19;
    393. public const int SPI_SETHANDHELD = 78;
    394. public const int SPI_SETHIGHCONTRAST = 67;
    395. public const int SPI_SETICONMETRICS = 46;
    396. public const int SPI_SETICONS = 88;
    397. public const int SPI_SETICONTITLELOGFONT = 34;
    398. public const int SPI_SETICONTITLEWRAP = 26;
    399. public const int SPI_SETKEYBOARDDELAY = 23;
    400. public const int SPI_SETKEYBOARDPREF = 69;
    401. public const int SPI_SETKEYBOARDSPEED = 11;
    402. public const int SPI_SETLANGTOGGLE = 91;
    403. public const int SPI_SETLOWPOWERACTIVE = 85;
    404. public const int SPI_SETLOWPOWERTIMEOUT = 81;
    405. public const int SPI_SETMENUDROPALIGNMENT = 28;
    406. public const int SPI_SETMINIMIZEDMETRICS = 44;
    407. public const int SPI_SETMOUSE = 4;
    408. public const int SPI_SETMOUSEBUTTONSWAP = 33;
    409. public const int SPI_SETMOUSEKEYS = 55;
    410. public const int SPI_SETMOUSETRAILS = 93;
    411. public const int SPI_SETNONCLIENTMETRICS = 42;
    412. public const int SPI_SETPENWINDOWS = 49;
    413. public const int SPI_SETPOWEROFFACTIVE = 86;
    414. public const int SPI_SETPOWEROFFTIMEOUT = 82;
    415. public const int SPI_SETSCREENREADER = 71;
    416. public const int SPI_SETSCREENSAVEACTIVE = 17;
    417. public const int SPI_SETSCREENSAVETIMEOUT = 15;
    418. public const int SPI_SETSERIALKEYS = 63;
    419. public const int SPI_SETSHOWSOUNDS = 57;
    420. public const int SPI_SETSOUNDSENTRY = 65;
    421. public const int SPI_SETSTICKYKEYS = 59;
    422. public const int SPI_SETTOGGLEKEYS = 53;
    423. public const int SPI_SETWORKAREA = 47;
    424. public const int SS_BLACKFRAME = 0x7;
    425. public const int SS_BLACKRECT = 0x4;
    426. public const int SS_CENTER = 0x1;
    427. public const int SS_GRAYFRAME = 0x8;
    428. public const int SS_GRAYRECT = 0x5;
    429. public const int SS_ICON = 0x3;
    430. public const int SS_LEFT = 0x0;
    431. public const int SS_LEFTNOWORDWRAP = 0xC;
    432. public const int SS_NOPREFIX = 0x80;
    433. public const int SS_RIGHT = 0x2;
    434. public const int SS_SIMPLE = 0xB;
    435. public const int SS_USERITEM = 0xA;
    436. public const int SS_WHITEFRAME = 0x9;
    437. public const int SS_WHITERECT = 0x6;
    438. public const int STM_GETICON = 0x171;
    439. public const int STM_MSGMAX = 0x172;
    440. public const int STM_SETICON = 0x170;
    441. public const int ST_ADVISE = 0x2;
    442. public const int ST_BEGINSWP = 0;
    443. public const int ST_BLOCKED = 0x8;
    444. public const int ST_BLOCKNEXT = 0x80;
    445. public const int ST_CLIENT = 0x10;
    446. public const int ST_CONNECTED = 0x1;
    447. public const int ST_ENDSWP = 1;
    448. public const int ST_INLIST = 0x40;
    449. public const int ST_ISLOCAL = 0x4;
    450. public const int ST_ISSELF = 0x100;
    451. public const int ST_TERMINATED = 0x20;
    452. public const int SWP_DRAWFRAME = SWP_FRAMECHANGED;
    453. public const int SWP_FRAMECHANGED = 0x20;
    454. public const int SWP_HIDEWINDOW = 0x80;
    455. public const int SWP_NOACTIVATE = 0x10;
    456. public const int SWP_NOCOPYBITS = 0x100;
    457. public const int SWP_NOMOVE = 0x2;
    458. public const int SWP_NOOWNERZORDER = 0x200;
    459. public const int SWP_NOREDRAW = 0x8;
    460. public const int SWP_NOREPOSITION = SWP_NOOWNERZORDER;
    461. public const int SWP_NOSIZE = 0x1;
    462. public const int SWP_NOZORDER = 0x4;
    463. public const int SWP_SHOWWINDOW = 0x40;
    464. public const int SW_ERASE = 0x4;
    465. public const int SW_HIDE = 0;
    466. public const int SW_INVALIDATE = 0x2;
    467. public const int SW_MAX = 10;
    468. public const int SW_MAXIMIZE = 3;
    469. public const int SW_MINIMIZE = 6;
    470. public const int SW_NORMAL = 1;
    471. public const int SW_OTHERUNZOOM = 4;
    472. public const int SW_OTHERZOOM = 2;
    473. public const int SW_PARENTCLOSING = 1;
    474. public const int SW_PARENTOPENING = 3;
    475. public const int SW_RESTORE = 9;
    476. public const int SW_SCROLLCHILDREN = 0x1;
    477. public const int SW_SHOW = 5;
    478. public const int SW_SHOWDEFAULT = 10;
    479. public const int SW_SHOWMAXIMIZED = 3;
    480. public const int SW_SHOWMINIMIZED = 2;
    481. public const int SW_SHOWMINNOACTIVE = 7;
    482. public const int SW_SHOWNA = 8;
    483. public const int SW_SHOWNOACTIVATE = 4;
    484. public const int SW_SHOWNORMAL = 1;
    485. public const int TIMEOUT_ASYNC = 0xFFFF;
    486. public const int TPM_CENTERALIGN = 0x4;
    487. public const int TPM_LEFTALIGN = 0x0;
    488. public const int TPM_LEFTBUTTON = 0x0;
    489. public const int TPM_RIGHTALIGN = 0x8;
    490. public const int TPM_RIGHTBUTTON = 0x2;
    491. public const int VK_ADD = 0x6B;
    492. public const int VK_ATTN = 0xF6;
    493. public const int VK_BACK = 0x8;
    494. public const int VK_CANCEL = 0x3;
    495. public const int VK_CAPITAL = 0x14;
    496. public const int VK_CLEAR = 0xC;
    497. public const int VK_CONTROL = 0x11;
    498. public const int VK_CRSEL = 0xF7;
    499. public const int VK_DECIMAL = 0x6E;
    500. public const int VK_DELETE = 0x2E;
    501. public const int VK_DIVIDE = 0x6F;
    502. public const int VK_DOWN = 0x28;
    503. public const int VK_END = 0x23;
    504. public const int VK_EREOF = 0xF9;
    505. public const int VK_ESCAPE = 0x1B;
    506. public const int VK_EXECUTE = 0x2B;
    507. public const int VK_EXSEL = 0xF8;
    508. public const int VK_F1 = 0x70;
    509. public const int VK_F10 = 0x79;
    510. public const int VK_F11 = 0x7A;
    511. public const int VK_F12 = 0x7B;
    512. public const int VK_F13 = 0x7C;
    513. public const int VK_F14 = 0x7D;
    514. public const int VK_F15 = 0x7E;
    515. public const int VK_F16 = 0x7F;
    516. public const int VK_F17 = 0x80;
    517. public const int VK_F18 = 0x81;
    518. public const int VK_F19 = 0x82;
    519. public const int VK_F2 = 0x71;
    520. public const int VK_F20 = 0x83;
    521. public const int VK_F21 = 0x84;
    522. public const int VK_F22 = 0x85;
    523. public const int VK_F23 = 0x86;
    524. public const int VK_F24 = 0x87;
    525. public const int VK_F3 = 0x72;
    526. public const int VK_F4 = 0x73;
    527. public const int VK_F5 = 0x74;
    528. public const int VK_F6 = 0x75;
    529. public const int VK_F7 = 0x76;
    530. public const int VK_F8 = 0x77;
    531. public const int VK_F9 = 0x78;
    532. public const int VK_HELP = 0x2F;
    533. public const int VK_HOME = 0x24;
    534. public const int VK_INSERT = 0x2D;
    535. public const int VK_LBUTTON = 0x1;
    536. public const int VK_LCONTROL = 0xA2;
    537. public const int VK_LEFT = 0x25;
    538. public const int VK_LMENU = 0xA4;
    539. public const int VK_LSHIFT = 0xA0;
    540. public const int VK_MBUTTON = 0x4;
    541. public const int VK_MENU = 0x12;
    542. public const int VK_MULTIPLY = 0x6A;
    543. public const int VK_NEXT = 0x22;
    544. public const int VK_NONAME = 0xFC;
    545. public const int VK_NUMLOCK = 0x90;
    546. public const int VK_NUMPAD0 = 0x60;
    547. public const int VK_NUMPAD1 = 0x61;
    548. public const int VK_NUMPAD2 = 0x62;
    549. public const int VK_NUMPAD3 = 0x63;
    550. public const int VK_NUMPAD4 = 0x64;
    551. public const int VK_NUMPAD5 = 0x65;
    552. public const int VK_NUMPAD6 = 0x66;
    553. public const int VK_NUMPAD7 = 0x67;
    554. public const int VK_NUMPAD8 = 0x68;
    555. public const int VK_NUMPAD9 = 0x69;
    556. public const int VK_OEM_CLEAR = 0xFE;
    557. public const int VK_PA1 = 0xFD;
    558. public const int VK_PAUSE = 0x13;
    559. public const int VK_PLAY = 0xFA;
    560. public const int VK_PRINT = 0x2A;
    561. public const int VK_PRIOR = 0x21;
    562. public const int VK_RBUTTON = 0x2;
    563. public const int VK_RCONTROL = 0xA3;
    564. public const int VK_RETURN = 0xD;
    565. public const int VK_RIGHT = 0x27;
    566. public const int VK_RMENU = 0xA5;
    567. public const int VK_RSHIFT = 0xA1;
    568. public const int VK_SCROLL = 0x91;
    569. public const int VK_SELECT = 0x29;
    570. public const int VK_SEPARATOR = 0x6C;
    571. public const int VK_SHIFT = 0x10;
    572. public const int VK_SNAPSHOT = 0x2C;
    573. public const int VK_SPACE = 0x20;
    574. public const int VK_SUBTRACT = 0x6D;
    575. public const int VK_TAB = 0x9;
    576. public const int VK_UP = 0x26;
    577. public const int VK_ZOOM = 0xFB;
    578. public const int WA_ACTIVE = 1;
    579. public const int WA_CLICKACTIVE = 2;
    580. public const int WA_INACTIVE = 0;
    581. public const int WB_ISDELIMITER = 2;
    582. public const int WB_LEFT = 0;
    583. public const int WB_RIGHT = 1;
    584. public const int WC_DIALOG = 8002;
    585. public const int WH_CALLWNDPROC = 4;
    586. public const int WH_CBT = 5;
    587. public const int WH_DEBUG = 9;
    588. public const int WH_FOREGROUNDIDLE = 11;
    589. public const int WH_GETMESSAGE = 3;
    590. public const int WH_HARDWARE = 8;
    591. public const int WH_JOURNALPLAYBACK = 1;
    592. public const int WH_JOURNALRECORD = 0;
    593. public const int WH_KEYBOARD = 2;
    594. public const int WH_MAX = 11;
    595. public const int WH_MIN = (-1);
    596. public const int WH_MOUSE = 7;
    597. public const int WH_MSGFILTER = (-1);
    598. public const int WH_SHELL = 10;
    599. public const int WH_SYSMSGFILTER = 6;
    600. public const int WINSTA_ACCESSCLIPBOARD = 0x4;
    601. public const int WINSTA_ACCESSPUBLICATOMS = 0x20;
    602. public const int WINSTA_CREATEDESKTOP = 0x8;
    603. public const int WINSTA_ENUMDESKTOPS = 0x1;
    604. public const int WINSTA_ENUMERATE = 0x100;
    605. public const int WINSTA_EXITWINDOWS = 0x40;
    606. public const int WINSTA_READATTRIBUTES = 0x2;
    607. public const int WINSTA_READSCREEN = 0x200;
    608. public const int WINSTA_WRITEATTRIBUTES = 0x10;
    609. public const int WM_ACTIVATE = 0x6;
    610. public const int WM_ACTIVATEAPP = 0x1C;
    611. public const int WM_ASKCBFORMATNAME = 0x30C;
    612. public const int WM_CANCELJOURNAL = 0x4B;
    613. public const int WM_CANCELMODE = 0x1F;
    614. public const int WM_CHANGECBCHAIN = 0x30D;
    615. public const int WM_CHAR = 0x102;
    616. public const int WM_CHARTOITEM = 0x2F;
    617. public const int WM_CHILDACTIVATE = 0x22;
    618. public const int WM_CLEAR = 0x303;
    619. public const int WM_CLOSE = 0x10;
    620. public const int WM_COMMAND = 0x111;
    621. public const int WM_COMMNOTIFY = 0x44;
    622. public const int WM_COMPACTING = 0x41;
    623. public const int WM_COMPAREITEM = 0x39;
    624. public const int WM_COPY = 0x301;
    625. public const int WM_COPYDATA = 0x4A;
    626. public const int WM_CREATE = 0x1;
    627. public const int WM_CTLCOLORBTN = 0x135;
    628. public const int WM_CTLCOLORDLG = 0x136;
    629. public const int WM_CTLCOLOREDIT = 0x133;
    630. public const int WM_CTLCOLORLISTBOX = 0x134;
    631. public const int WM_CTLCOLORMSGBOX = 0x132;
    632. public const int WM_CTLCOLORSCROLLBAR = 0x137;
    633. public const int WM_CTLCOLORSTATIC = 0x138;
    634. public const int WM_CUT = 0x300;
    635. public const int WM_DDE_ACK = (WM_DDE_FIRST + 4);
    636. public const int WM_DDE_ADVISE = (WM_DDE_FIRST + 2);
    637. public const int WM_DDE_DATA = (WM_DDE_FIRST + 5);
    638. public const int WM_DDE_EXECUTE = (WM_DDE_FIRST + 8);
    639. public const int WM_DDE_FIRST = 0x3E0;
    640. public const int WM_DDE_INITIATE = (WM_DDE_FIRST);
    641. public const int WM_DDE_LAST = (WM_DDE_FIRST + 8);
    642. public const int WM_DDE_POKE = (WM_DDE_FIRST + 7);
    643. public const int WM_DDE_REQUEST = (WM_DDE_FIRST + 6);
    644. public const int WM_DDE_TERMINATE = (WM_DDE_FIRST + 1);
    645. public const int WM_DDE_UNADVISE = (WM_DDE_FIRST + 3);
    646. public const int WM_DEADCHAR = 0x103;
    647. public const int WM_DELETEITEM = 0x2D;
    648. public const int WM_DESTROY = 0x2;
    649. public const int WM_DESTROYCLIPBOARD = 0x307;
    650. public const int WM_DEVMODECHANGE = 0x1B;
    651. public const int WM_DRAWCLIPBOARD = 0x308;
    652. public const int WM_DRAWITEM = 0x2B;
    653. public const int WM_DROPFILES = 0x233;
    654. public const int WM_ENABLE = 0xA;
    655. public const int WM_ENDSESSION = 0x16;
    656. public const int WM_ENTERIDLE = 0x121;
    657. public const int WM_ENTERMENULOOP = 0x211;
    658. public const int WM_ERASEBKGND = 0x14;
    659. public const int WM_EXITMENULOOP = 0x212;
    660. public const int WM_FONTCHANGE = 0x1D;
    661. public const int WM_GETDLGCODE = 0x87;
    662. public const int WM_GETFONT = 0x31;
    663. public const int WM_GETHOTKEY = 0x33;
    664. public const int WM_GETMINMAXINFO = 0x24;
    665. public const int WM_GETTEXT = 0xD;
    666. public const int WM_GETTEXTLENGTH = 0xE;
    667. public const int WM_HOTKEY = 0x312;
    668. public const int WM_HSCROLL = 0x114;
    669. public const int WM_HSCROLLCLIPBOARD = 0x30E;
    670. public const int WM_ICONERASEBKGND = 0x27;
    671. public const int WM_INITDIALOG = 0x110;
    672. public const int WM_INITMENU = 0x116;
    673. public const int WM_INITMENUPOPUP = 0x117;
    674. public const int WM_KEYDOWN = 0x100;
    675. public const int WM_KEYFIRST = 0x100;
    676. public const int WM_KEYLAST = 0x108;
    677. public const int WM_KEYUP = 0x101;
    678. public const int WM_KILLFOCUS = 0x8;
    679. public const int WM_LBUTTONDBLCLK = 0x203;
    680. public const int WM_LBUTTONDOWN = 0x201;
    681. public const int WM_LBUTTONUP = 0x202;
    682. public const int WM_MBUTTONDBLCLK = 0x209;
    683. public const int WM_MBUTTONDOWN = 0x207;
    684. public const int WM_MBUTTONUP = 0x208;
    685. public const int WM_MDIACTIVATE = 0x222;
    686. public const int WM_MDICASCADE = 0x227;
    687. public const int WM_MDICREATE = 0x220;
    688. public const int WM_MDIDESTROY = 0x221;
    689. public const int WM_MDIGETACTIVE = 0x229;
    690. public const int WM_MDIICONARRANGE = 0x228;
    691. public const int WM_MDIMAXIMIZE = 0x225;
    692. public const int WM_MDINEXT = 0x224;
    693. public const int WM_MDIREFRESHMENU = 0x234;
    694. public const int WM_MDIRESTORE = 0x223;
    695. public const int WM_MDISETMENU = 0x230;
    696. public const int WM_MDITILE = 0x226;
    697. public const int WM_MEASUREITEM = 0x2C;
    698. public const int WM_MENUCHAR = 0x120;
    699. public const int WM_MENUSELECT = 0x11F;
    700. public const int WM_MOUSEACTIVATE = 0x21;
    701. public const int WM_MOUSEFIRST = 0x200;
    702. public const int WM_MOUSELAST = 0x209;
    703. public const int WM_MOUSEMOVE = 0x200;
    704. public const int WM_MOVE = 0x3;
    705. public const int WM_NCACTIVATE = 0x86;
    706. public const int WM_NCCALCSIZE = 0x83;
    707. public const int WM_NCCREATE = 0x81;
    708. public const int WM_NCDESTROY = 0x82;
    709. public const int WM_NCHITTEST = 0x84;
    710. public const int WM_NCLBUTTONDBLCLK = 0xA3;
    711. public const int WM_NCLBUTTONDOWN = 0xA1;
    712. public const int WM_NCLBUTTONUP = 0xA2;
    713. public const int WM_NCMBUTTONDBLCLK = 0xA9;
    714. public const int WM_NCMBUTTONDOWN = 0xA7;
    715. public const int WM_NCMBUTTONUP = 0xA8;
    716. public const int WM_NCMOUSEMOVE = 0xA0;
    717. public const int WM_NCPAINT = 0x85;
    718. public const int WM_NCRBUTTONDBLCLK = 0xA6;
    719. public const int WM_NCRBUTTONDOWN = 0xA4;
    720. public const int WM_NCRBUTTONUP = 0xA5;
    721. public const int WM_NEXTDLGCTL = 0x28;
    722. public const int WM_NULL = 0x0;
    723. public const int WM_OTHERWINDOWCREATED = 0x42;
    724. public const int WM_OTHERWINDOWDESTROYED = 0x43;
    725. public const int WM_PAINT = 0xF;
    726. public const int WM_PAINTCLIPBOARD = 0x309;
    727. public const int WM_PAINTICON = 0x26;
    728. public const int WM_PALETTECHANGED = 0x311;
    729. public const int WM_PALETTEISCHANGING = 0x310;
    730. public const int WM_PARENTNOTIFY = 0x210;
    731. public const int WM_PASTE = 0x302;
    732. public const int WM_PENWINFIRST = 0x380;
    733. public const int WM_PENWINLAST = 0x38F;
    734. public const int WM_POWER = 0x48;
    735. public const int WM_QUERYDRAGICON = 0x37;
    736. public const int WM_QUERYENDSESSION = 0x11;
    737. public const int WM_QUERYNEWPALETTE = 0x30F;
    738. public const int WM_QUERYOPEN = 0x13;
    739. public const int WM_QUEUESYNC = 0x23;
    740. public const int WM_QUIT = 0x12;
    741. public const int WM_RBUTTONDBLCLK = 0x206;
    742. public const int WM_RBUTTONDOWN = 0x204;
    743. public const int WM_RBUTTONUP = 0x205;
    744. public const int WM_RENDERALLFORMATS = 0x306;
    745. public const int WM_RENDERFORMAT = 0x305;
    746. public const int WM_SETCURSOR = 0x20;
    747. public const int WM_SETFOCUS = 0x7;
    748. public const int WM_SETFONT = 0x30;
    749. public const int WM_SETHOTKEY = 0x32;
    750. public const int WM_SETREDRAW = 0xB;
    751. public const int WM_SETTEXT = 0xC;
    752. public const int WM_SHOWWINDOW = 0x18;
    753. public const int WM_SIZE = 0x5;
    754. public const int WM_SIZECLIPBOARD = 0x30B;
    755. public const int WM_SPOOLERSTATUS = 0x2A;
    756. public const int WM_SYSCHAR = 0x106;
    757. public const int WM_SYSCOLORCHANGE = 0x15;
    758. public const int WM_SYSCOMMAND = 0x112;
    759. public const int WM_SYSDEADCHAR = 0x107;
    760. public const int WM_SYSKEYDOWN = 0x104;
    761. public const int WM_SYSKEYUP = 0x105;
    762. public const int WM_TIMECHANGE = 0x1E;
    763. public const int WM_TIMER = 0x113;
    764. public const int WM_UNDO = 0x304;
    765. public const int WM_USER = 0x400;
    766. public const int WM_VKEYTOITEM = 0x2E;
    767. public const int WM_VSCROLL = 0x115;
    768. public const int WM_VSCROLLCLIPBOARD = 0x30A;
    769. public const int WM_WINDOWPOSCHANGED = 0x47;
    770. public const int WM_WINDOWPOSCHANGING = 0x46;
    771. public const int WM_WININICHANGE = 0x1A;
    772. public const int WPF_RESTORETOMAXIMIZED = 0x2;
    773. public const int WPF_SETMINPOSITION = 0x1;
    774. public const int WRITE = 1;
    775. public const int WS_BORDER = 0x800000;
    776. public const int WS_CAPTION = 0xC00000;
    777. public const int WS_CHILD = 0x40000000;
    778. public const int WS_CHILDWINDOW = (WS_CHILD);
    779. public const int WS_CLIPCHILDREN = 0x2000000;
    780. public const int WS_CLIPSIBLINGS = 0x4000000;
    781. public const int WS_DISABLED = 0x8000000;
    782. public const int WS_DLGFRAME = 0x400000;
    783. public const int WS_EX_ACCEPTFILES = 0x10;
    784. public const int WS_EX_DLGMODALFRAME = 0x1;
    785. public const int WS_EX_NOPARENTNOTIFY = 0x4;
    786. public const int WS_EX_TOPMOST = 0x8;
    787. public const int WS_EX_TRANSPARENT = 0x20;
    788. public const int WS_GROUP = 0x20000;
    789. public const int WS_HSCROLL = 0x100000;
    790. public const int WS_ICONIC = WS_MINIMIZE;
    791. public const int WS_MAXIMIZE = 0x1000000;
    792. public const int WS_MAXIMIZEBOX = 0x10000;
    793. public const int WS_MINIMIZE = 0x20000000;
    794. public const int WS_MINIMIZEBOX = 0x20000;
    795. public const int WS_OVERLAPPED = 0x0;
    796. public const int WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX);
    797. public const int WS_POPUP = unchecked((int)0x80000000);
    798. public const int WS_POPUPWINDOW = (WS_POPUP | WS_BORDER | WS_SYSMENU);
    799. public const int WS_SIZEBOX = WS_THICKFRAME;
    800. public const int WS_SYSMENU = 0x80000;
    801. public const int WS_TABSTOP = 0x10000;
    802. public const int WS_THICKFRAME = 0x40000;
    803. public const int WS_TILED = WS_OVERLAPPED;
    804. public const int WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW;
    805. public const int WS_VISIBLE = 0x10000000;
    806. public const int WS_VSCROLL = 0x200000;
    807. public const int WVR_ALIGNBOTTOM = 0x40;
    808. public const int WVR_ALIGNLEFT = 0x20;
    809. public const int WVR_ALIGNRIGHT = 0x80;
    810. public const int WVR_ALIGNTOP = 0x10;
    811. public const int WVR_HREDRAW = 0x100;
    812. public const int WVR_REDRAW = (WVR_HREDRAW | WVR_VREDRAW);
    813. public const int WVR_VALIDRECTS = 0x400;
    814. public const int WVR_VREDRAW = 0x200;
    815. public const int XCLASS_BOOL = 0x1000;
    816. public const int XCLASS_DATA = 0x2000;
    817. public const int XCLASS_FLAGS = 0x4000;
    818. public const int XCLASS_MASK = 0xFC00;
    819. public const int XCLASS_NOTIFICATION = 0x8000;
    820. public const int XST_ADVACKRCVD = 13;
    821. public const int XST_ADVDATAACKRCVD = 16;
    822. public const int XST_ADVDATASENT = 15;
    823. public const int XST_ADVSENT = 11;
    824. public const int XST_CONNECTED = 2;
    825. public const int XST_DATARCVD = 6;
    826. public const int XST_EXECACKRCVD = 10;
    827. public const int XST_EXECSENT = 9;
    828. public const int XST_INCOMPLETE = 1;
    829. public const int XST_INIT1 = 3;
    830. public const int XST_INIT2 = 4;
    831. public const int XST_NULL = 0;
    832. public const int XST_POKEACKRCVD = 8;
    833. public const int XST_POKESENT = 7;
    834. public const int XST_REQSENT = 5;
    835. public const int XST_UNADVACKRCVD = 14;
    836. public const int XST_UNADVSENT = 12;
    837. public const int XTYPF_ACKREQ = 0x8;
    838. public const int XTYPF_NOBLOCK = 0x2;
    839. public const int XTYPF_NODATA = 0x4;
    840. public const int XTYP_ADVDATA = (0x10 | XCLASS_FLAGS);
    841. public const int XTYP_ADVREQ = (0x20 | XCLASS_DATA | XTYPF_NOBLOCK);
    842. public const int XTYP_ADVSTART = (0x30 | XCLASS_BOOL);
    843. public const int XTYP_ADVSTOP = (0x40 | XCLASS_NOTIFICATION);
    844. public const int XTYP_CONNECT = (0x60 | XCLASS_BOOL | XTYPF_NOBLOCK);
    845. public const int XTYP_CONNECT_CONFIRM = (0x70 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
    846. public const int XTYP_DISCONNECT = (0xC0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
    847. public const int XTYP_ERROR = (0x0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
    848. public const int XTYP_EXECUTE = (0x50 | XCLASS_FLAGS);
    849. public const int XTYP_MASK = 0xF0;
    850. public const int XTYP_MONITOR = (0xF0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
    851. public const int XTYP_POKE = (0x90 | XCLASS_FLAGS);
    852. public const int XTYP_REGISTER = (0xA0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
    853. public const int XTYP_REQUEST = (0xB0 | XCLASS_DATA);
    854. public const int XTYP_SHIFT = 4;
    855. public const int XTYP_UNREGISTER = (0xD0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
    856. public const int XTYP_WILDCONNECT = (0xE0 | XCLASS_DATA | XTYPF_NOBLOCK);
    857. public const int XTYP_XACT_COMPLETE = (0x80 | XCLASS_NOTIFICATION);
    858. public const string SZDDESYS_ITEM_FORMATS = "Formats";
    859. public const string SZDDESYS_ITEM_HELP = "Help";
    860. public const string SZDDESYS_ITEM_RTNMSG = "ReturnMessage";
    861. public const string SZDDESYS_ITEM_STATUS = "Status";
    862. public const string SZDDESYS_ITEM_SYSITEMS = "SysItems";
    863. public const string SZDDESYS_ITEM_TOPICS = "Topics";
    864. public const string SZDDESYS_TOPIC = "System";
    865. public const string SZDDE_ITEM_ITEMLIST = "TopicItemList";
    866. }
    867. }
    复制代码


    发帖求助前要善用论坛搜索功能,那里可能会有你要找的答案;

    如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子分类或者标题加上【已解决】

    如何回报帮助你解决问题的坛友,可以以【悬赏】的方式提问,伸手党遭人唾弃,做一个热心并受欢迎的人!

  • TA的每日心情
    奋斗
    2018-11-2 10:21
  • 签到天数: 21 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    10

    主题

    27

    帖子

    227

    积分

    Rank: 7Rank: 7Rank: 7

    积分
    227

    优质会员

     楼主| 发表于 2018-4-27 16:55:41 | 显示全部楼层
    Shell.cs
    1. using System;
    2. using System.Runtime.InteropServices;

    3. using HWND = System.IntPtr;
    4. using HANDLE = System.IntPtr;

    5. namespace Win32
    6. {
    7.     public struct DRAGINFO
    8.     {
    9.         public int uSize;
    10.         public POINT pt;
    11.         public int fNC;
    12.         public string lpFileList;
    13.         public int grfKeyState;
    14.     }
    15.     public struct APPBARDATA
    16.     {
    17.         public int cbSize;
    18.         public HWND hwnd;
    19.         public int uCallbackMessage;
    20.         public int uEdge;
    21.         public RECT rc;
    22.         public int lParam;
    23.     }
    24.     public struct SHFILEOPSTRUCT
    25.     {
    26.         public HWND hwnd;
    27.         public int wFunc;
    28.         public string pFrom;
    29.         public string pTo;
    30.         public short fFlags;
    31.         public int fAnyOperationsAborted;
    32.         public HANDLE hNameMappings;
    33.         public string lpszProgressTitle;
    34.     }
    35.     public struct SHNAMEMAPPING
    36.     {
    37.         public string pszOldPath;
    38.         public string pszNewPath;
    39.         public int cchOldPath;
    40.         public int cchNewPath;
    41.     }
    42.     public struct SHELLEXECUTEINFO
    43.     {
    44.         public int cbSize;
    45.         public int fMask;
    46.         public HWND hwnd;
    47.         public string lpVerb;
    48.         public string lpFile;
    49.         public string lpParameters;
    50.         public string lpDirectory;
    51.         public int nShow;
    52.         public HANDLE hInstApp;
    53.         public int lpIDList;
    54.         public string lpClass;
    55.         public HANDLE hkeyClass;
    56.         public int dwHotKey;
    57.         public HANDLE hIcon;
    58.         public HANDLE hProcess;
    59.     }
    60.     public struct NOTIFYICONDATA
    61.     {
    62.         public int cbSize;
    63.         public HWND hwnd;
    64.         public int uID;
    65.         public int uFlags;
    66.         public int uCallbackMessage;
    67.         public HANDLE hIcon;
    68.         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)] public string szTip;
    69.     }
    70.     public struct SHFILEINFO
    71.     {
    72.         public HANDLE hIcon;
    73.         public int iIcon;
    74.         public int dwAttributes;
    75.         [MarshalAs(UnmanagedType.ByValArray, SizeConst=Kernel.MAX_PATH)]public string szDisplayName;
    76.         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=80)] public string szTypeName;
    77.     }

    78.     public abstract class Shell
    79.     {
    80.         [DllImport("shell32")] public static extern int CommandLineToArgv(string lpCmdLine, short pNumArgs);
    81.         [DllImport("shell32")] public static extern int DoEnvironmentSubst(string szString, int cbString);
    82.         [DllImport("shell32")] public static extern int DragQueryFile(HANDLE hDROP, int UINT, string lpStr, int ch);
    83.         [DllImport("shell32")] public static extern int DragQueryPoint(HANDLE hDROP, ref POINT lpPoint);
    84.         [DllImport("shell32")] public static extern int DuplicateIcon(HANDLE hInst, HANDLE hIcon);
    85.         [DllImport("shell32")] public static extern int ExtractAssociatedIcon(HANDLE hInst, string lpIconPath, ref int lpiIcon);
    86.         [DllImport("shell32")] public static extern int ExtractIcon(HANDLE hInst, string lpszExeFileName, int nIconIndex);
    87.         [DllImport("shell32")] public static extern int ExtractIconEx(string lpszFile, int nIconIndex, ref int phiconLarge, ref int phiconSmall, int nIcons);
    88.         [DllImport("shell32")] public static extern int FindExecutable(string lpFile, string lpDirectory, string lpResult);
    89.         [DllImport("shell32")] public static extern int SHAppBarMessage(int dwMessage, ref APPBARDATA pData);
    90.         [DllImport("shell32")] public static extern int SHFileOperation(ref SHFILEOPSTRUCT lpFileOp);
    91.         [DllImport("shell32")] public static extern int SHGetFileInfo(string pszPath, int dwFileAttributes, ref SHFILEINFO psfi, int cbFileInfo, int uFlags);
    92.         [DllImport("shell32")] public static extern int SHGetNewLinkInfo(string pszLinkto, string pszDir, string pszName, ref int pfMustCopy, int uFlags);
    93.         [DllImport("shell32")] public static extern int ShellAbout(HWND hwnd, string szApp, string szOtherStuff, HANDLE hIcon);
    94.         [DllImport("shell32")] public static extern int ShellExecute(HWND hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd);
    95.         [DllImport("shell32")] public static extern int Shell_NotifyIcon(int dwMessage, ref NOTIFYICONDATA lpData);
    96.         [DllImport("shell32")] public static extern void DragAcceptFiles(HWND hwnd, int fAccept);
    97.         [DllImport("shell32")] public static extern void DragFinish(HANDLE hDrop);
    98.         [DllImport("shell32")] public static extern void SHFreeNameMappings(HANDLE hNameMappings);
    99.         [DllImport("shell32")] public static extern void WinExecError(HWND hwnd, int error, string lpstrFileName, string lpstrTitle);
    100.         [DllImport("shell32")] public static extern int SHBrowseForFolder(BROWSEINFO lpbi);
    101.         [DllImport("shell32")] public static extern int SHGetPathFromIDList(int pidList, string lpBuffer);

    102.         public const int ABE_BOTTOM = 3;
    103.         public const int ABE_LEFT = 0;
    104.         public const int ABE_RIGHT = 2;
    105.         public const int ABE_TOP = 1;
    106.         public const int ABM_ACTIVATE = 0x6;
    107.         public const int ABM_GETAUTOHIDEBAR = 0x7;
    108.         public const int ABM_GETSTATE = 0x4;
    109.         public const int ABM_GETTASKBARPOS = 0x5;
    110.         public const int ABM_NEW = 0x0;
    111.         public const int ABM_QUERYPOS = 0x2;
    112.         public const int ABM_REMOVE = 0x1;
    113.         public const int ABM_SETAUTOHIDEBAR = 0x8;
    114.         public const int ABM_SETPOS = 0x3;
    115.         public const int ABM_WINDOWPOSCHANGED = 0x9;
    116.         public const int ABN_FULLSCREENAPP = 0x2;
    117.         public const int ABN_POSCHANGED = 0x1;
    118.         public const int ABN_STATECHANGE = 0x0;
    119.         public const int ABN_WINDOWARRANGE = 0x3;
    120.         public const int ABS_ALWAYSONTOP = 0x2;
    121.         public const int ABS_AUTOHIDE = 0x1;
    122.         public const int EIRESID = -1;
    123.         public const int FOF_ALLOWUNDO = 0x40;
    124.         public const int FOF_CONFIRMMOUSE = 0x2;
    125.         public const int FOF_FILESONLY = 0x80;
    126.         public const int FOF_MULTIDESTFILES = 0x1;
    127.         public const int FOF_NOCONFIRMATION = 0x10;
    128.         public const int FOF_NOCONFIRMMKDIR = 0x200;
    129.         public const int FOF_RENAMEONCOLLISION = 0x8;
    130.         public const int FOF_SILENT = 0x4;
    131.         public const int FOF_SIMPLEPROGRESS = 0x100;
    132.         public const int FOF_WANTMAPPINGHANDLE = 0x20;
    133.         public const int FO_COPY = 0x2;
    134.         public const int FO_DELETE = 0x3;
    135.         public const int FO_MOVE = 0x1;
    136.         public const int FO_RENAME = 0x4;
    137.         public const int NIF_ICON = 0x2;
    138.         public const int NIF_MESSAGE = 0x1;
    139.         public const int NIF_TIP = 0x4;
    140.         public const int NIM_ADD = 0x0;
    141.         public const int NIM_DELETE = 0x2;
    142.         public const int NIM_MODIFY = 0x1;
    143.         public const int PO_DELETE = 0x13;
    144.         public const int PO_PORTCHANGE = 0x20;
    145.         public const int PO_RENAME = 0x14;
    146.         public const int PO_REN_PORT = 0x34;
    147.         public const int SEE_MASK_CLASSKEY = 0x3;
    148.         public const int SEE_MASK_CLASSNAME = 0x1;
    149.         public const int SEE_MASK_CONNECTNETDRV = 0x80;
    150.         public const int SEE_MASK_DOENVSUBST = 0x200;
    151.         public const int SEE_MASK_FLAG_DDEWAIT = 0x100;
    152.         public const int SEE_MASK_FLAG_NO_UI = 0x400;
    153.         public const int SEE_MASK_HOTKEY = 0x20;
    154.         public const int SEE_MASK_ICON = 0x10;
    155.         public const int SEE_MASK_IDLIST = 0x4;
    156.         public const int SEE_MASK_INVOKEIDLIST = 0xC;
    157.         public const int SEE_MASK_NOCLOSEPROCESS = 0x40;
    158.         public const int SE_ERR_ACCESSDENIED = 5;
    159.         public const int SE_ERR_ASSOCINCOMPLETE = 27;
    160.         public const int SE_ERR_DDEBUSY = 30;
    161.         public const int SE_ERR_DDEFAIL = 29;
    162.         public const int SE_ERR_DDETIMEOUT = 28;
    163.         public const int SE_ERR_DLLNOTFOUND = 32;
    164.         public const int SE_ERR_FNF = 2;
    165.         public const int SE_ERR_NOASSOC = 31;
    166.         public const int SE_ERR_OOM = 8;
    167.         public const int SE_ERR_PNF = 3;
    168.         public const int SE_ERR_SHARE = 26;
    169.         public const int SHGFI_ATTRIBUTES = 0x800;
    170.         public const int SHGFI_DISPLAYNAME = 0x200;
    171.         public const int SHGFI_EXETYPE = 0x2000;
    172.         public const int SHGFI_ICON = 0x100;
    173.         public const int SHGFI_ICONLOCATION = 0x1000;
    174.         public const int SHGFI_LARGEICON = 0x0;
    175.         public const int SHGFI_LINKOVERLAY = 0x8000;
    176.         public const int SHGFI_OPENICON = 0x2;
    177.         public const int SHGFI_PIDL = 0x8;
    178.         public const int SHGFI_SELECTED = 0x10000;
    179.         public const int SHGFI_SHELLICONSIZE = 0x4;
    180.         public const int SHGFI_SMALLICON = 0x1;
    181.         public const int SHGFI_SYSICONINDEX = 0x4000;
    182.         public const int SHGFI_TYPENAME = 0x400;
    183.         public const int SHGFI_USEFILEATTRIBUTES = 0x10;
    184.         public const int SHGNLI_PIDL = 0x1;
    185.         public const int SHGNLI_PREFIXNAME = 0x2;
    186.     }
    187. }
    复制代码


    发帖求助前要善用论坛搜索功能,那里可能会有你要找的答案;

    如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子分类或者标题加上【已解决】

    如何回报帮助你解决问题的坛友,可以以【悬赏】的方式提问,伸手党遭人唾弃,做一个热心并受欢迎的人!

  • TA的每日心情
    擦汗
    2018-9-3 08:55
  • 签到天数: 10 天

    连续签到: 1 天

    [LV.3]偶尔看看II

    0

    主题

    26

    帖子

    2570

    积分

    Rank: 5Rank: 5Rank: 5

    积分
    2570

    优质会员

    发表于 2018-8-24 14:53:10 | 显示全部楼层
    顶一个..................

    发帖求助前要善用论坛搜索功能,那里可能会有你要找的答案;

    如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子分类或者标题加上【已解决】

    如何回报帮助你解决问题的坛友,可以以【悬赏】的方式提问,伸手党遭人唾弃,做一个热心并受欢迎的人!

  • TA的每日心情
    开心
    2018-10-19 16:32
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]初来乍到

    0

    主题

    8

    帖子

    34

    积分

    Rank: 1

    积分
    34

    优质会员

    发表于 2018-10-15 15:17:39 | 显示全部楼层
    感谢楼主分享。
    希望楼主能够补全代码中缺少的结构体定义!

    发帖求助前要善用论坛搜索功能,那里可能会有你要找的答案;

    如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子分类或者标题加上【已解决】

    如何回报帮助你解决问题的坛友,可以以【悬赏】的方式提问,伸手党遭人唾弃,做一个热心并受欢迎的人!

  • TA的每日心情
    开心
    2018-9-11 17:29
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]初来乍到

    0

    主题

    12

    帖子

    158

    积分

    Rank: 1

    积分
    158
    发表于 2018-10-15 16:37:41 | 显示全部楼层
    干嘛用的,看不懂

    发帖求助前要善用论坛搜索功能,那里可能会有你要找的答案;

    如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子分类或者标题加上【已解决】

    如何回报帮助你解决问题的坛友,可以以【悬赏】的方式提问,伸手党遭人唾弃,做一个热心并受欢迎的人!

  • TA的每日心情
    奋斗
    2018-11-2 10:21
  • 签到天数: 21 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    10

    主题

    27

    帖子

    227

    积分

    Rank: 7Rank: 7Rank: 7

    积分
    227

    优质会员

     楼主| 发表于 2018-10-17 09:34:51 | 显示全部楼层
    as260405901 发表于 2018-10-15 15:17
    感谢楼主分享。
    希望楼主能够补全代码中缺少的结构体定义!

    结构体自己定义就好,我只发了基本的封装的函数!

    发帖求助前要善用论坛搜索功能,那里可能会有你要找的答案;

    如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子分类或者标题加上【已解决】

    如何回报帮助你解决问题的坛友,可以以【悬赏】的方式提问,伸手党遭人唾弃,做一个热心并受欢迎的人!

  • TA的每日心情
    擦汗
    6 小时前
  • 签到天数: 299 天

    连续签到: 17 天

    [LV.8]以坛为家I

    0

    主题

    10

    帖子

    2115

    积分

    Rank: 5Rank: 5Rank: 5

    积分
    2115
    发表于 2018-11-1 08:42:29 | 显示全部楼层
    可能会有我要找的答案

    发帖求助前要善用论坛搜索功能,那里可能会有你要找的答案;

    如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子分类或者标题加上【已解决】

    如何回报帮助你解决问题的坛友,可以以【悬赏】的方式提问,伸手党遭人唾弃,做一个热心并受欢迎的人!

    您需要登录后才可以回帖 会员登录 | 会员注册

    本版积分规则

    经营性网站备案信息 经营性网站
    备案信息

    中国互联网举报中心 中国互联网
    举报中心

    中国文明网传播文明 中国文明网
    传播文明

    诚信网站

    深圳市市场监督管理局企业主体身份公示 工商网监
    电子标识

    快速回复 返回顶部 返回列表