C#封装好的Win32API

Kernel.cs

   1 using System;
   2 using System.Runtime.InteropServices;
   3 using System.Text;
   4 
   5 using HANDLE = System.IntPtr;
   6 using HWND = System.IntPtr;
   7 
   8 namespace Win32
   9 {
  10     public struct OVERLAPPED 
  11     {
  12         public int Internal;
  13         public int InternalHigh;
  14         public int offset;
  15         public int OffsetHigh;
  16         public HANDLE hEvent;
  17     }
  18     public struct SECURITY_ATTRIBUTES 
  19     {
  20         public int nLength;
  21         public int lpSecurityDescriptor;
  22         public int bInheritHandle; 
  23     }
  24     public struct PROCESS_INFORMATION 
  25     {
  26         public HANDLE hProcess;
  27         public HANDLE hThread;
  28         public int dwProcessId;
  29         public int dwThreadId;
  30     }
  31     public struct COMMPROP 
  32     {
  33         public short wPacketLength;
  34         public short wPacketVersion;
  35         public int dwServiceMask;
  36         public int dwReserved1;
  37         public int dwMaxTxQueue;
  38         public int dwMaxRxQueue;
  39         public int dwMaxBaud;
  40         public int dwProvSubType;
  41         public int dwProvCapabilities;
  42         public int dwSettableParams;
  43         public int dwSettableBaud;
  44         public short wSettableData;
  45         public short wSettableStopParity;
  46         public int dwCurrentTxQueue;
  47         public int dwCurrentRxQueue;
  48         public int dwProvSpec1;
  49         public int dwProvSpec2;
  50         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public short[] wcProvChar; 
  51     }
  52     public struct COMSTAT 
  53     {
  54         public int fBitFields; 
  55         public int cbInQue;
  56         public int cbOutQue;
  57     }
  58     public struct DCB 
  59     {
  60         public int DCBlength;
  61         public int BaudRate;
  62         public int fBitFields; 
  63         public short wReserved;
  64         public short XonLim;
  65         public short XoffLim;
  66         public byte ByteSize;
  67         public byte Parity;
  68         public byte StopBits;
  69         public byte XonChar;
  70         public byte XoffChar;
  71         public byte ErrorChar;
  72         public byte EofChar;
  73         public byte EvtChar;
  74         public short wReserved1; 
  75     }
  76     public struct COMMTIMEOUTS 
  77     {
  78         public int ReadIntervalTimeout;
  79         public int ReadTotalTimeoutMultiplier;
  80         public int ReadTotalTimeoutConstant;
  81         public int WriteTotalTimeoutMultiplier;
  82         public int WriteTotalTimeoutConstant;
  83     }
  84     public struct SYSTEM_INFO 
  85     {
  86         public int dwOemID;
  87         public int dwPageSize;
  88         public int lpMinimumApplicationAddress;
  89         public int lpMaximumApplicationAddress;
  90         public int dwActiveProcessorMask;
  91         public int dwNumberOrfProcessors;
  92         public int dwProcessorType;
  93         public int dwAllocationGranularity;
  94         public int dwReserved;
  95     }
  96     #region Global Memory Flags
  97     #endregion
  98     public struct MEMORYSTATUS 
  99     {
 100         public int dwLength;
 101         public int dwMemoryLoad;
 102         public int dwTotalPhys;
 103         public int dwAvailPhys;
 104         public int dwTotalPageFile;
 105         public int dwAvailPageFile;
 106         public int dwTotalVirtual;
 107         public int dwAvailVirtual;
 108     }
 109     public struct GENERIC_MAPPING 
 110     {
 111         public int GenericRead;
 112         public int GenericWrite;
 113         public int GenericExecute;
 114         public int GenericAll;
 115     }
 116     public struct LUID 
 117     {
 118         public int LowPart;
 119         public int HighPart;
 120     }
 121     public struct LUID_AND_ATTRIBUTES 
 122     {
 123         public LUID pLuid;
 124         public int Attributes;
 125     }
 126     public struct ACL 
 127     {
 128         public byte AclRevision;
 129         public byte Sbz1;
 130         public short AclSize;
 131         public short AceCount;
 132         public short Sbz2;
 133     }
 134     public struct ACE_HEADER 
 135     {
 136         public byte AceType;
 137         public byte AceFlags;
 138         public int AceSize;
 139     }
 140     public struct ACCESS_ALLOWED_ACE 
 141     {
 142         public ACE_HEADER Header;
 143         public int Mask;
 144         public int SidStart;
 145     }
 146     public struct ACCESS_DENIED_ACE 
 147     {
 148         public ACE_HEADER Header;
 149         public int Mask;
 150         public int SidStart;
 151     }
 152     public struct SYSTEM_AUDIT_ACE 
 153     {
 154         public ACE_HEADER Header;
 155         public int Mask;
 156         public int SidStart;
 157     }
 158     public struct SYSTEM_ALARM_ACE 
 159     {
 160         public ACE_HEADER Header;
 161         public int Mask;
 162         public int SidStart;
 163     }
 164     public struct ACL_REVISION_INFORMATION 
 165     {
 166         public int AclRevision;
 167     }
 168     public struct ACL_SIZE_INFORMATION 
 169     {
 170         public int AceCount;
 171         public int AclBytesInUse;
 172         public int AclBytesFree;
 173     }
 174     public struct SECURITY_DESCRIPTOR 
 175     {
 176         public byte Revision;
 177         public byte Sbz1;
 178         public int Control;
 179         public int Owner;
 180         public int Group;
 181         public ACL Sacl;
 182         public ACL Dacl;
 183     }
 184     public struct PRIVILEGE_SET 
 185     {
 186         public int PrivilegeCount;
 187         public int Control;
 188         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public LUID_AND_ATTRIBUTES[] Privilege;
 189     }
 190     public struct EXCEPTION_RECORD 
 191     {
 192         public int ExceptionCode;
 193         public int ExceptionFlags;
 194         public int pExceptionRecord;    
 195         public int ExceptionAddress;
 196         public int NumberParameters;
 197         [MarshalAs(UnmanagedType.ByValArray, SizeConst=15)] public int [] ExceptionInformation;
 198     }
 199     public struct EXCEPTION_DEBUG_INFO 
 200     {
 201         public EXCEPTION_RECORD pExceptionRecord;
 202         public int dwFirstChance;
 203     }
 204     public struct CREATE_THREAD_DEBUG_INFO 
 205     {
 206         public HANDLE hThread;
 207         public int lpThreadLocalBase;
 208         public int lpStartAddress;
 209     }
 210     public struct CREATE_PROCESS_DEBUG_INFO 
 211     {
 212         public HANDLE hFile;
 213         public HANDLE hProcess;
 214         public HANDLE hThread;
 215         public int lpBaseOfImage;
 216         public int dwDebugInfoFileOffset;
 217         public int nDebugInfoSize;
 218         public int lpThreadLocalBase;
 219         public int lpStartAddress;
 220         public int lpImageName;
 221         public short fUnicode;
 222     }
 223     public struct EXIT_THREAD_DEBUG_INFO 
 224     {
 225         public int dwExitCode;
 226     }
 227     public struct EXIT_PROCESS_DEBUG_INFO 
 228     {
 229         public int dwExitCode;
 230     }
 231     public struct LOAD_DLL_DEBUG_INFO 
 232     {
 233         public HANDLE hFile;
 234         public int lpBaseOfDll;
 235         public int dwDebugInfoFileOffset;
 236         public int nDebugInfoSize;
 237         public int lpImageName;
 238         public short fUnicode;
 239     }
 240     public struct UNLOAD_DLL_DEBUG_INFO 
 241     {
 242         public int lpBaseOfDll;
 243     }
 244     public struct OUTPUT_DEBUG_STRING_INFO 
 245     {
 246         public string lpDebugStringData;
 247         public short fUnicode;
 248         public short nDebugStringLength;
 249     }
 250     public struct RIP_INFO 
 251     {
 252         public int dwError;
 253         public int dwType;
 254     }
 255     public struct OFSTRUCT 
 256     {
 257         public byte cBytes;
 258         public byte fFixedDisk;
 259         public short nErrCode;
 260         public short Reserved1;
 261         public short Reserved2;
 262         [MarshalAs(UnmanagedType.ByValArray, SizeConst=128)] public byte[] szPathName;
 263     }
 264     public struct CRITICAL_SECTION 
 265     {
 266         public int pDebugInfo;
 267         public int LockCount;
 268         public int RecursionCount;
 269         public int pOwningThread;
 270         public int pLockSemaphore;
 271         public int Reserved;
 272     }
 273     public struct BY_HANDLE_FILE_INFORMATION 
 274     {
 275         public int dwFileAttributes;
 276         public FILETIME ftCreationTime;
 277         public FILETIME ftLastAccessTime;
 278         public FILETIME ftLastWriteTime;
 279         public int dwVolumeSerialNumber;
 280         public int nFileSizeHigh;
 281         public int nFileSizeLow;
 282         public int nNumberOfLinks;
 283         public int nFileIndexHigh;
 284         public int nFileIndexLow;
 285     }
 286     public struct MEMORY_BASIC_INFORMATION 
 287     {
 288         public int BaseAddress;
 289         public int AllocationBase;
 290         public int AllocationProtect;
 291         public int RegionSize;
 292         public int State;
 293         public int Protect;
 294         public int lType;
 295     }
 296     public struct EVENTLOGRECORD 
 297     {
 298         public int Length; 
 299         public int Reserved; 
 300         public int RecordNumber; 
 301         public int TimeGenerated; 
 302         public int TimeWritten; 
 303         public int EventID;
 304         public short EventType;
 305         public short NumStrings;
 306         public short EventCategory;
 307         public short ReservedFlags; 
 308         public int ClosingRecordNumber; 
 309         public int StringOffset; 
 310         public int UserSidLength;
 311         public int UserSidOffset;
 312         public int DataLength;
 313         public int DataOffset; 
 314     }
 315     public struct TOKEN_GROUPS 
 316     {
 317         public int GroupCount;
 318         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)]     public SID_AND_ATTRIBUTES[] Groups;
 319     }
 320     public struct TOKEN_PRIVILEGES 
 321     {
 322         public int PrivilegeCount;
 323         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public LUID_AND_ATTRIBUTES[] Privileges;
 324     }
 325     public struct CONTEXT 
 326     {
 327         public double FltF0;
 328         public double FltF1;
 329         public double FltF2;
 330         public double FltF3;
 331         public double FltF4;
 332         public double FltF5;
 333         public double FltF6;
 334         public double FltF7;
 335         public double FltF8;
 336         public double FltF9;
 337         public double FltF10;
 338         public double FltF11;
 339         public double FltF12;
 340         public double FltF13;
 341         public double FltF14;
 342         public double FltF15;
 343         public double FltF16;
 344         public double FltF17;
 345         public double FltF18;
 346         public double FltF19;
 347         public double FltF20;
 348         public double FltF21;
 349         public double FltF22;
 350         public double FltF23;
 351         public double FltF24;
 352         public double FltF25;
 353         public double FltF26;
 354         public double FltF27;
 355         public double FltF28;
 356         public double FltF29;
 357         public double FltF30;
 358         public double FltF31;
 359         public double IntV0;
 360         public double IntT0;
 361         public double IntT1;
 362         public double IntT2;
 363         public double IntT3;
 364         public double IntT4;
 365         public double IntT5;
 366         public double IntT6;
 367         public double IntT7;
 368         public double IntS0;
 369         public double IntS1;
 370         public double IntS2;
 371         public double IntS3;
 372         public double IntS4;
 373         public double IntS5;
 374         public double IntFp;
 375         public double IntA0;
 376         public double IntA1;
 377         public double IntA2;
 378         public double IntA3;
 379         public double IntA4;
 380         public double IntA5;
 381         public double IntT8;
 382         public double IntT9;
 383         public double IntT10;
 384         public double IntT11;
 385         public double IntRa;
 386         public double IntT12;
 387         public double IntAt;
 388         public double IntGp;
 389         public double IntSp;
 390         public double IntZero;
 391         public double Fpcr;
 392         public double SoftFpcr;
 393         public double Fir;
 394         public int Psr;
 395         public int ContextFlags;
 396         [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)] public int []Fill;
 397     }
 398     public struct EXCEPTION_POINTERS 
 399     {
 400         public EXCEPTION_RECORD pExceptionRecord;
 401         public CONTEXT ContextRecord;
 402     }
 403     public struct LDT_BYTES    
 404     { 
 405         public byte BaseMid;
 406         public byte Flags1;
 407         public byte Flags2;
 408         public byte BaseHi;
 409     }
 410     public struct LDT_ENTRY 
 411     {
 412         public short LimitLow;
 413         public short BaseLow;
 414         public int HighWord;    
 415     }
 416     public struct TIME_ZONE_INFORMATION 
 417     {
 418         public int Bias;
 419         [MarshalAs(UnmanagedType.ByValArray, SizeConst=32)] public short[] StandardName;
 420         public SYSTEMTIME StandardDate;
 421         public int StandardBias;
 422         [MarshalAs(UnmanagedType.ByValArray, SizeConst=32)] public short[] DaylightName;
 423         public SYSTEMTIME DaylightDate;
 424         public int DaylightBias;
 425     }
 426     public struct WIN32_STREAM_ID 
 427     {
 428         public int dwStreamID;
 429         public int dwStreamAttributes;
 430         public int dwStreamSizeLow;
 431         public int dwStreamSizeHigh;
 432         public int dwStreamNameSize;
 433         public byte cStreamName;
 434     }
 435     public struct STARTUPINFO 
 436     {
 437         public int cb;
 438         public string lpReserved;
 439         public string lpDesktop;
 440         public string lpTitle;
 441         public int dwX;
 442         public int dwY;
 443         public int dwXSize;
 444         public int dwYSize;
 445         public int dwXCountChars;
 446         public int dwYCountChars;
 447         public int dwFillAttribute;
 448         public int dwFlags;
 449         public short wShowWindow;
 450         public short cbReserved2;
 451         public int lpReserved2;
 452         public HANDLE hStdInput;
 453         public HANDLE hStdOutput;
 454         public HANDLE hStdError;
 455     }
 456     public struct CPINFO 
 457     {
 458         public int MaxCharSize; 
 459         [MarshalAs(UnmanagedType.ByValArray, SizeConst=Kernel.MAX_DEFAULTCHAR)] public byte[] DefaultChar; 
 460         [MarshalAs(UnmanagedType.ByValArray, SizeConst=Kernel.MAX_LEADBYTES)] public byte[] LeadByte; 
 461     }
 462     public struct NUMBERFMT 
 463     {
 464         public int NumDigits; 
 465         public int LeadingZero; 
 466         public int Grouping; 
 467         public string lpDecimalSep; 
 468         public string lpThousandSep; 
 469         public int NegativeOrder; 
 470     }
 471     public struct CURRENCYFMT 
 472     {
 473         public int NumDigits; 
 474         public int LeadingZero; 
 475         public int Grouping; 
 476         public string lpDecimalSep; 
 477         public string lpThousandSep; 
 478         public int NegativeOrder; 
 479         public int PositiveOrder; 
 480         public string lpCurrencySymbol; 
 481     }
 482     public struct COORD 
 483     {
 484         public short x;
 485         public short y;
 486     }
 487     public struct SMALL_RECT 
 488     {
 489         public short Left;
 490         public short Top;
 491         public short Right;
 492         public short Bottom;
 493     }
 494     public struct KEY_EVENT_RECORD 
 495     {
 496         public int bKeyDown;
 497         public short wRepeatCount;
 498         public short wVirtualKeyCode;
 499         public short wVirtualScanCode;
 500         public byte uChar;
 501         public int dwControlKeyState;
 502     }
 503     public struct MOUSE_EVENT_RECORD 
 504     {
 505         public COORD dwMousePosition;
 506         public int dwButtonState;
 507         public int dwControlKeyState;
 508         public int dwEventFlags;
 509     }
 510     public struct WINDOW_BUFFER_SIZE_RECORD 
 511     {
 512         public COORD dwSize;
 513     }
 514     public struct MENU_EVENT_RECORD 
 515     {
 516         public int dwCommandId;
 517     }
 518     public struct FOCUS_EVENT_RECORD 
 519     {
 520         public int bSetFocus;
 521     }
 522     public struct CHAR_INFO 
 523     {
 524         public short Char;
 525         public short Attributes;
 526     }
 527     public struct CONSOLE_SCREEN_BUFFER_INFO 
 528     {
 529         public COORD dwSize;
 530         public COORD dwCursorPosition;
 531         public short wAttributes;
 532         public SMALL_RECT srWindow;
 533         public COORD dwMaximumWindowSize;
 534     }
 535     public struct CONSOLE_CURSOR_INFO 
 536     {
 537         public int dwSize;
 538         public int bVisible;
 539     }
 540     public struct SID_IDENTIFIER_AUTHORITY 
 541     {
 542         [MarshalAs(UnmanagedType.ByValArray, SizeConst=6)] public byte[] Value;
 543     }
 544     public struct SID_AND_ATTRIBUTES 
 545     {
 546         public int Sid;
 547         public int Attributes;
 548     }
 549     public struct WIN32_FIND_DATA 
 550     {
 551         public int dwFileAttributes;
 552         public FILETIME ftCreationTime; 
 553         public FILETIME ftLastAccessTime; 
 554         public FILETIME ftLastWriteTime; 
 555         public int nFileSizeHigh;
 556         public int nFileSizeLow;
 557         public int dwReserved0;
 558         public int dwReserved1;
 559         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=Kernel.MAX_PATH)] 
 560         public string cFileName; 
 561         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=14)] 
 562         public string cAlternate; 
 563     }
 564     public struct COMMCONFIG 
 565     {
 566         public int dwSize;
 567         public short wVersion;
 568         public short wReserved;
 569         public DCB dcbx;
 570         public int dwProviderSubType;
 571         public int dwProviderOffset;
 572         public int dwProviderSize;
 573         public byte wcProviderData;
 574     }
 575     public struct SERVICE_STATUS 
 576     {
 577         public int dwServiceType;
 578         public int dwCurrentState;
 579         public int dwControlsAccepted;
 580         public int dwWin32ExitCode;
 581         public int dwServiceSpecificExitCode;
 582         public int dwCheckPoint;
 583         public int dwWaitHint;
 584     }
 585     public struct ENUM_SERVICE_STATUS 
 586     {
 587         public string lpServiceName;
 588         public string lpDisplayName;
 589         public SERVICE_STATUS ServiceStatus;
 590     }
 591     public struct QUERY_SERVICE_LOCK_STATUS 
 592     {
 593         public int fIsLocked;
 594         public string lpLockOwner;
 595         public int dwLockDuration;
 596     }
 597     public struct QUERY_SERVICE_CONFIG 
 598     {
 599         public int dwServiceType;
 600         public int dwStartType;
 601         public int dwErrorControl;
 602         public string lpBinaryPathName;
 603         public string lpLoadOrderGroup;
 604         public int dwTagId;
 605         public string lpDependencies;
 606         public string lpServiceStartName;
 607         public string lpDisplayName;
 608     }
 609     public struct SERVICE_TABLE_ENTRY 
 610     {
 611         public string lpServiceName;
 612         public int lpServiceProc;
 613     }
 614     public struct LARGE_INTEGER 
 615     {
 616         public int lowpart;
 617         public int highpart;
 618     }
 619     public struct PERF_DATA_BLOCK 
 620     {
 621         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=4)] public string Signature; 
 622         public int LittleEndian;
 623         public int Version;
 624         public int Revision;
 625         public int TotalByteLength;
 626         public int HeaderLength;
 627         public int NumObjectTypes;
 628         public int DefaultObject;
 629         public SYSTEMTIME SystemTime;
 630         public LARGE_INTEGER PerfTime;
 631         public LARGE_INTEGER PerfFreq;
 632         public LARGE_INTEGER PerTime100nSec;
 633         public int SystemNameLength;
 634         public int SystemNameOffset;
 635     }
 636     public struct PERF_OBJECT_TYPE 
 637     {
 638         public int TotalByteLength;
 639         public int DefinitionLength;
 640         public int HeaderLength;
 641         public int ObjectNameTitleIndex;
 642         public string ObjectNameTitle;
 643         public int ObjectHelpTitleIndex;
 644         public string ObjectHelpTitle;
 645         public int DetailLevel;
 646         public int NumCounters;
 647         public int DefaultCounter;
 648         public int NumInstances;
 649         public int CodePage;
 650         public LARGE_INTEGER PerfTime;
 651         public LARGE_INTEGER PerfFreq;
 652     }
 653     public struct PERF_COUNTER_DEFINITION 
 654     {
 655         public int ByteLength;
 656         public int CounterNameTitleIndex;
 657         public string CounterNameTitle;
 658         public int CounterHelpTitleIndex;
 659         public string CounterHelpTitle;
 660         public int DefaultScale;
 661         public int DetailLevel;
 662         public int CounterType;
 663         public int CounterSize;
 664         public int CounterOffset;
 665     }
 666     public struct PERF_INSTANCE_DEFINITION 
 667     {
 668         public int ByteLength;
 669         public int ParentObjectTitleIndex;
 670         public int ParentObjectInstance;
 671         public int UniqueID;
 672         public int NameOffset;
 673         public int NameLength;
 674     }
 675     public struct PERF_COUNTER_BLOCK 
 676     {
 677         public int ByteLength;
 678     }
 679     public struct OSVERSIONINFO 
 680     {
 681         public int dwOSVersionInfoSize;
 682         public int dwMajorVersion;
 683         public int dwMinorVersion;
 684         public int dwBuildNumber;
 685         public int dwPlatformId;
 686         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)] public string szCSDVersion; 
 687     }
 688     public struct SYSTEM_POWER_STATUS 
 689     {
 690         public byte ACLineStatus;
 691         public byte BatteryFlag;
 692         public byte BatteryLifePercent;
 693         public byte Reserved1;
 694         public int BatteryLifeTime;
 695         public int BatteryFullLifeTime;
 696     }
 697 
 698     public abstract class AdvApi
 699     {
 700         [DllImport("AdvApi32")] public static extern int ImpersonateLoggedOnUser(HANDLE hToken);
 701         [DllImport("advapi32")] public static extern int IsTextUnicode(IntPtr lpBuffer, int cb, ref int lpi);
 702         [DllImport("advapi32")] public static extern int LogonUser(string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, ref int phToken);
 703         [DllImport("advapi32")] public static extern int NotifyChangeEventLog(HANDLE hEventLog, HANDLE hEvent);
 704         [DllImport("advapi32")] public static extern int SetThreadToken(int Thread, int Token);
 705         [DllImport("advapi32")] public static extern Byte GetSidSubAuthorityCount(IntPtr pSid);
 706         [DllImport("advapi32")] public static extern SID_IDENTIFIER_AUTHORITY GetSidIdentifierAuthority(IntPtr pSid);
 707         [DllImport("advapi32")] public static extern int AbortSystemShutdown(string lpMachineName);
 708         [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);
 709         [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);
 710         [DllImport("advapi32")] public static extern int AddAccessAllowedAce(ref ACL pAcl, int dwAceRevision, int AccessMask, IntPtr pSid);
 711         [DllImport("advapi32")] public static extern int AddAccessDeniedAce(ref ACL pAcl, int dwAceRevision, int AccessMask, IntPtr pSid);
 712         [DllImport("advapi32")] public static extern int AddAce(ref ACL pAcl, int dwAceRevision, int dwStartingAceIndex, IntPtr pAceList, int nAceListLength);
 713         [DllImport("advapi32")] public static extern int AddAuditAccessAce(ref ACL pAcl, int dwAceRevision, int dwAccessMask, IntPtr pSid, int bAuditSuccess, int bAuditFailure);
 714         [DllImport("advapi32")] public static extern int AdjustTokenGroups(int TokenHandle, int ResetToDefault, TOKEN_GROUPS NewState, int BufferLength, TOKEN_GROUPS PreviousState, int ReturnLength);
 715         [DllImport("advapi32")] public static extern int AdjustTokenPrivileges(int TokenHandle, int DisableAllPrivileges, TOKEN_PRIVILEGES NewState, int BufferLength, TOKEN_PRIVILEGES PreviousState, int ReturnLength);
 716         [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);
 717         [DllImport("advapi32")] public static extern int AllocateLocallyUniqueId(LARGE_INTEGER Luid);
 718         [DllImport("advapi32")] public static extern int AreAllAccessesGranted(int GrantedAccess, int DesiredAccess);
 719         [DllImport("advapi32")] public static extern int AreAnyAccessesGranted(int GrantedAccess, int DesiredAccess);
 720         [DllImport("advapi32")] public static extern int BackupEventLog(HANDLE hEventLog, string lpBackupFileName);
 721         [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);
 722         [DllImport("advapi32")] public static extern int ClearEventLog(HANDLE hEventLog, string lpBackupFileName);
 723         [DllImport("advapi32")] public static extern int CloseEventLog(HANDLE hEventLog);
 724         [DllImport("advapi32")] public static extern int CloseServiceHandle(HANDLE hSCObject);
 725         [DllImport("advapi32")] public static extern int ControlService(HANDLE hService, int dwControl, ref SERVICE_STATUS lpServiceStatus);
 726         [DllImport("advapi32")] public static extern int CopySid(int nDestinationSidLength, IntPtr pDestinationSid, IntPtr pSourceSid);
 727         [DllImport("advapi32")] public static extern int CreatePrivateObjectSecurity(ref SECURITY_DESCRIPTOR ParentDescriptor, SECURITY_DESCRIPTOR CreatorDescriptor, SECURITY_DESCRIPTOR NewDescriptor, int IsDirectoryObject, int Token, GENERIC_MAPPING GenericMapping);
 728         [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);
 729         [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);
 730         [DllImport("advapi32")] public static extern int DeleteAce(ref ACL pAcl, int dwAceIndex);
 731         [DllImport("advapi32")] public static extern int DeleteService(HANDLE hService);
 732         [DllImport("advapi32")] public static extern int DeregisterEventSource(HANDLE hEventLog);
 733         [DllImport("advapi32")] public static extern int DestroyPrivateObjectSecurity(ref SECURITY_DESCRIPTOR ObjectDescriptor);
 734         [DllImport("advapi32")] public static extern int DuplicateToken(int ExistingTokenHandle, short ImpersonationLevel, int DuplicateTokenHandle);
 735         [DllImport("advapi32")] public static extern int EnumDependentServices(HANDLE hService, int dwServiceState, ref ENUM_SERVICE_STATUS lpServices, int cbBufSize, ref int pcbBytesNeeded, ref int lpServicesReturned);
 736         [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);
 737         [DllImport("advapi32")] public static extern int EqualPrefixSid(IntPtr pSid1, IntPtr pSid2);
 738         [DllImport("advapi32")] public static extern int EqualSid(IntPtr pSid1, IntPtr pSid2);
 739         [DllImport("advapi32")] public static extern int FindFirstFreeAce(ref ACL pAcl, ref int pAce);
 740         [DllImport("advapi32")] public static extern int GetAce(ref ACL pAcl, int dwAceIndex, IntPtr pAce);
 741         [DllImport("advapi32")] public static extern int GetAclInformation(ref ACL pAcl, IntPtr pAclInformation, int nAclInformationLength, short dwAclInformationClass);
 742         [DllImport("advapi32")] public static extern int GetFileSecurity(string lpFileName, int RequestedInformation, ref SECURITY_DESCRIPTOR pSecurityDescriptor, int nLength, ref int lpnLengthNeeded);
 743         [DllImport("advapi32")] public static extern int GetKernelObjectSecurity(HANDLE handle, int RequestedInformation, ref SECURITY_DESCRIPTOR pSecurityDescriptor, int nLength, ref int lpnLengthNeeded);
 744         [DllImport("advapi32")] public static extern int GetLengthSid(IntPtr pSid);
 745         [DllImport("advapi32")] public static extern int GetNumberOfEventLogRecords(HANDLE hEventLog, int NumberOfRecords);
 746         [DllImport("advapi32")] public static extern int GetOldestEventLogRecord(HANDLE hEventLog, int OldestRecord);
 747         [DllImport("advapi32")] public static extern int GetPrivateObjectSecurity(ref SECURITY_DESCRIPTOR ObjectDescriptor, int SecurityInformation, SECURITY_DESCRIPTOR ResultantDescriptor, int DescriptorLength, int ReturnLength);
 748         [DllImport("advapi32")] public static extern int GetSecurityDescriptorControl(ref SECURITY_DESCRIPTOR pSecurityDescriptor, short pControl, ref int lpdwRevision);
 749         [DllImport("advapi32")] public static extern int GetSecurityDescriptorDacl(ref SECURITY_DESCRIPTOR pSecurityDescriptor, ref int lpbDaclPresent, ref ACL pDacl, ref int lpbDaclDefaulted);
 750         [DllImport("advapi32")] public static extern int GetSecurityDescriptorGroup(ref SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr pGroup, ref int lpbGroupDefaulted);
 751         [DllImport("advapi32")] public static extern int GetSecurityDescriptorLength(ref SECURITY_DESCRIPTOR pSecurityDescriptor);
 752         [DllImport("advapi32")] public static extern int GetSecurityDescriptorOwner(ref SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr pOwner, ref int lpbOwnerDefaulted);
 753         [DllImport("advapi32")] public static extern int GetSecurityDescriptorSacl(ref SECURITY_DESCRIPTOR pSecurityDescriptor, ref int lpbSaclPresent, ref ACL pSacl, ref int lpbSaclDefaulted);
 754         [DllImport("advapi32")] public static extern int GetServiceDisplayName(HANDLE hSCManager, string lpServiceName, StringBuilder lpDisplayName, ref int cchBuffer);
 755         [DllImport("advapi32")] public static extern int GetServiceKeyName(HANDLE hSCManager, string lpDisplayName, StringBuilder lpServiceName, ref int cchBuffer);
 756         [DllImport("advapi32")] public static extern int GetSidLengthRequired(Byte nSubAuthorityCount);
 757         [DllImport("advapi32")] public static extern int GetSidSubAuthority(IntPtr pSid, int nSubAuthority);
 758         [DllImport("advapi32")] public static extern int GetTokenInformation(int TokenHandle, short TokenInformationClass, IntPtr TokenInformation, int TokenInformationLength, int ReturnLength);
 759         [DllImport("advapi32")] public static extern int GetUserName(StringBuilder lpBuffer, int nSize);
 760         [DllImport("advapi32")] public static extern int ImpersonateNamedPipeClient(HANDLE hNamedPipe);
 761         [DllImport("advapi32")] public static extern int ImpersonateSelf(short ImpersonationLevel);
 762         [DllImport("advapi32")] public static extern int InitializeAcl(ref ACL pAcl, int nAclLength, int dwAclRevision);
 763         [DllImport("advapi32")] public static extern int InitializeSecurityDescriptor(ref SECURITY_DESCRIPTOR pSecurityDescriptor, int dwRevision);
 764         [DllImport("advapi32")] public static extern int InitializeSid(IntPtr Sid, ref SID_IDENTIFIER_AUTHORITY pIdentifierAuthority, Byte nSubAuthorityCount);
 765         [DllImport("advapi32")] public static extern int InitiateSystemShutdown(string lpMachineName, string lpMessage, int dwTimeout, int bForceAppsClosed, int bRebootAfterShutdown);
 766         [DllImport("advapi32")] public static extern int IsValidAcl(ref ACL pAcl);
 767         [DllImport("advapi32")] public static extern int IsValidSecurityDescriptor(ref SECURITY_DESCRIPTOR pSecurityDescriptor);
 768         [DllImport("advapi32")] public static extern int IsValidSid(IntPtr pSid);
 769         [DllImport("advapi32")] public static extern int LockServiceDatabase(HANDLE hSCManager);
 770         [DllImport("advapi32")] public static extern int LookupAccountName(string lpSystemName, string lpAccountName, int Sid, int cbSid, string ReferencedDomainName, int cbReferencedDomainName, int peUse);
 771         [DllImport("advapi32")] public static extern int LookupAccountSid(string lpSystemName, IntPtr Sid, string name, int cbName, string ReferencedDomainName, int cbReferencedDomainName, int peUse);
 772         [DllImport("advapi32")] public static extern int LookupPrivilegeDisplayName(string lpSystemName, string lpName, string lpDisplayName, int cbDisplayName, ref int lpLanguageID);
 773         [DllImport("advapi32")] public static extern int LookupPrivilegeName(string lpSystemName, ref LARGE_INTEGER lpLuid, string lpName, int cbName);
 774         [DllImport("advapi32")] public static extern int LookupPrivilegeValue(string lpSystemName, string lpName, ref LARGE_INTEGER lpLuid);
 775         [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);
 776         [DllImport("advapi32")] public static extern int MakeSelfRelativeSD(ref SECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, ref SECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor, ref int lpdwBufferLength);
 777         [DllImport("advapi32")] public static extern int NotifyBootConfigStatus(int BootAcceptable);
 778         [DllImport("advapi32")] public static extern int ObjectCloseAuditAlarm(string SubsystemName, IntPtr HandleId, int GenerateOnClose);
 779         [DllImport("advapi32")] public static extern int ObjectPrivilegeAuditAlarm(string SubsystemName, IntPtr HandleId, int ClientToken, int DesiredAccess, PRIVILEGE_SET Privileges, int AccessGranted);
 780         [DllImport("advapi32")] public static extern int OpenBackupEventLog(string lpUNCServerName, string lpFileName);
 781         [DllImport("advapi32")] public static extern int OpenEventLog(string lpUNCServerName, string lpSourceName);
 782         [DllImport("advapi32")] public static extern int OpenSCManager(string lpMachineName, string lpDatabaseName, int dwDesiredAccess);
 783         [DllImport("advapi32")] public static extern int OpenService(HANDLE hSCManager, string lpServiceName, int dwDesiredAccess);
 784         [DllImport("advapi32")] public static extern int OpenThreadToken(int ThreadHandle, int DesiredAccess, int OpenAsSelf, int TokenHandle);
 785         [DllImport("advapi32")] public static extern int PrivilegeCheck(int ClientToken, PRIVILEGE_SET RequiredPrivileges, ref int pfResult);
 786         [DllImport("advapi32")] public static extern int PrivilegedServiceAuditAlarm(string SubsystemName, string ServiceName, int ClientToken, PRIVILEGE_SET Privileges, int AccessGranted);
 787         [DllImport("advapi32")] public static extern int QueryServiceConfig(HANDLE hService, ref QUERY_SERVICE_CONFIG lpServiceConfig, int cbBufSize, ref int pcbBytesNeeded);
 788         [DllImport("advapi32")] public static extern int QueryServiceLockStatus(HANDLE hSCManager, ref QUERY_SERVICE_LOCK_STATUS lpLockStatus, int cbBufSize, ref int pcbBytesNeeded);
 789         [DllImport("advapi32")] public static extern int QueryServiceObjectSecurity(HANDLE hService, int dwSecurityInformation, IntPtr lpSecurityDescriptor, int cbBufSize, ref int pcbBytesNeeded);
 790         [DllImport("advapi32")] public static extern int QueryServiceStatus(HANDLE hService, ref SERVICE_STATUS lpServiceStatus);
 791         [DllImport("advapi32")] public static extern int ReadEventLog(HANDLE hEventLog, int dwReadFlags, int dwRecordOffset, ref EVENTLOGRECORD lpBuffer, int nNumberOfBytesToRead, ref int pnBytesRead, ref int pnMinNumberOfBytesNeeded);
 792         [DllImport("advapi32")] public static extern int RegCloseKey(HANDLE hKey);
 793         [DllImport("advapi32")] public static extern int RegConnectRegistry(string lpMachineName, HANDLE hKey, ref int phkResult);
 794         [DllImport("advapi32")] public static extern int RegCreateKey(HANDLE hKey, string lpSubKey, ref int phkResult);
 795         [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);
 796         [DllImport("advapi32")] public static extern int RegDeleteKey(HANDLE hKey, string lpSubKey);
 797         [DllImport("advapi32")] public static extern int RegDeleteValue(HANDLE hKey, string lpValueName);
 798         [DllImport("advapi32")] public static extern int RegEnumKey(HANDLE hKey, int dwIndex, string lpName, int cbName);
 799         [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);
 800         [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);
 801         [DllImport("advapi32")] public static extern int RegFlushKey(HANDLE hKey);
 802         [DllImport("advapi32")] public static extern int RegGetKeySecurity(HANDLE hKey, int SecurityInformation, ref SECURITY_DESCRIPTOR pSecurityDescriptor, ref int lpcbSecurityDescriptor);
 803         [DllImport("advapi32")] public static extern int RegLoadKey(HANDLE hKey, string lpSubKey, string lpFile);
 804         [DllImport("advapi32")] public static extern int RegNotifyChangeKeyValue(HANDLE hKey, int bWatchSubtree, int dwNotifyFilter, HANDLE hEvent, int fAsynchronus);
 805         [DllImport("advapi32")] public static extern int RegOpenKey(HANDLE hKey, string lpSubKey, ref int phkResult);
 806         [DllImport("advapi32")] public static extern int RegOpenKeyEx(HANDLE hKey, string lpSubKey, int ulOptions, int samDesired, ref int phkResult);
 807         [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);
 808         [DllImport("advapi32")] public static extern int RegQueryValue(HANDLE hKey, string lpSubKey, string lpValue, ref int lpcbValue);
 809         [DllImport("advapi32")] public static extern int RegQueryValueEx(HANDLE hKey, string lpValueName, ref int lpReserved, ref int lpType, IntPtr lpData, ref int lpcbData); 
 810         [DllImport("advapi32")] public static extern int RegReplaceKey(HANDLE hKey, string lpSubKey, string lpNewFile, string lpOldFile);
 811         [DllImport("advapi32")] public static extern int RegRestoreKey(HANDLE hKey, string lpFile, int dwFlags);
 812         [DllImport("advapi32")] public static extern int RegSaveKey(HANDLE hKey, string lpFile, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
 813         [DllImport("advapi32")] public static extern int RegSetKeySecurity(HANDLE hKey, int SecurityInformation, ref SECURITY_DESCRIPTOR pSecurityDescriptor);
 814         [DllImport("advapi32")] public static extern int RegSetValue(HANDLE hKey, string lpSubKey, int dwType, string lpData, int cbData);
 815         [DllImport("advapi32")] public static extern int RegSetValueEx(HANDLE hKey, string lpValueName, int Reserved, int dwType, IntPtr lpData, int cbData); 
 816         [DllImport("advapi32")] public static extern int RegUnLoadKey(HANDLE hKey, string lpSubKey);
 817         [DllImport("advapi32")] public static extern int RegisterEventSource(string lpUNCServerName, string lpSourceName);
 818         [DllImport("advapi32")] public static extern int RegisterServiceCtrlHandler(string lpServiceName, ref int lpHandlerProc);
 819         [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);
 820         [DllImport("advapi32")] public static extern int RevertToSelf();
 821         [DllImport("advapi32")] public static extern int SetAclInformation(ref ACL pAcl, IntPtr pAclInformation, int nAclInformationLength, short dwAclInformationClass);
 822         [DllImport("advapi32")] public static extern int SetFileSecurity(string lpFileName, int SecurityInformation, ref SECURITY_DESCRIPTOR pSecurityDescriptor);
 823         [DllImport("advapi32")] public static extern int SetKernelObjectSecurity(HANDLE handle, int SecurityInformation, SECURITY_DESCRIPTOR SecurityDescriptor);
 824         [DllImport("advapi32")] public static extern int SetPrivateObjectSecurity(int SecurityInformation, SECURITY_DESCRIPTOR ModificationDescriptor, SECURITY_DESCRIPTOR ObjectsSecurityDescriptor, GENERIC_MAPPING GenericMapping, int Token);
 825         [DllImport("advapi32")] public static extern int SetSecurityDescriptorDacl(ref SECURITY_DESCRIPTOR pSecurityDescriptor, int bDaclPresent, ref ACL pDacl, int bDaclDefaulted);
 826         [DllImport("advapi32")] public static extern int SetSecurityDescriptorGroup(ref SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr pGroup, int bGroupDefaulted);
 827         [DllImport("advapi32")] public static extern int SetSecurityDescriptorOwner(ref SECURITY_DESCRIPTOR pSecurityDescriptor, IntPtr pOwner, int bOwnerDefaulted);
 828         [DllImport("advapi32")] public static extern int SetSecurityDescriptorSacl(ref SECURITY_DESCRIPTOR pSecurityDescriptor, int bSaclPresent, ref ACL pSacl, int bSaclDefaulted);
 829         [DllImport("advapi32")] public static extern int SetServiceObjectSecurity(HANDLE hService, int dwSecurityInformation, IntPtr lpSecurityDescriptor);
 830         [DllImport("advapi32")] public static extern int SetServiceStatus(HANDLE hServiceStatus, ref SERVICE_STATUS lpServiceStatus);
 831         [DllImport("advapi32")] public static extern int SetTokenInformation(int TokenHandle, short TokenInformationClass, IntPtr TokenInformation, int TokenInformationLength);
 832         [DllImport("advapi32")] public static extern int StartService(HANDLE hService, int dwNumServiceArgs, ref int lpServiceArgVectors);
 833         [DllImport("advapi32")] public static extern int StartServiceCtrlDispatcher(ref SERVICE_TABLE_ENTRY lpServiceStartTable);
 834         [DllImport("advapi32")] public static extern int UnlockServiceDatabase(IntPtr ScLock);
 835         [DllImport("advapi32")] public static extern void FreeSid(IntPtr pSid);
 836         [DllImport("advapi32")] public static extern void MapGenericMask(int AccessMask, GENERIC_MAPPING GenericMapping);
 837         [DllImport("advapi32")] public static extern int GetUserNameW(Byte lpBuffer, int nSize);
 838         [DllImport("advapi32")] public static extern int OpenProcessToken(int ProcessHandle, int DesiredAccess, int TokenHandle);
 839     }
 840 
 841     public abstract class Version
 842     {
 843         [DllImport("version")] public static extern int GetFileVersionInfo(string lptstrFilename, int dwHandle, int dwLen, IntPtr lpData);
 844         [DllImport("version")] public static extern int GetFileVersionInfoSize(string lptstrFilename, ref int lpdwHandle);
 845         [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);
 846         [DllImport("version")] public static extern int VerInstallFile(int uFlags, string szSrcFileName, string szDestFileName, string szSrcDir, string szDestDir, string szCurDir, string szTmpFile, ref int lpuTmpFileLen);
 847         [DllImport("version")] public static extern int VerQueryValue(IntPtr pBlock, string lpSubBlock, ref int lplpBuffer, ref int puLen);
 848     }
 849 
 850     public abstract class Kernel
 851     {
 852         [DllImport("kernel32")] public static extern void OutputDebugString(string lpszOutputString);
 853         [DllImport("KERNEL32")] public static extern int ConvertDefaultLocale(int Locale);
 854         [DllImport("KERNEL32")] public static extern int EnumDateFormats(int lpDateFmtEnumProc, int Locale, int dwFlags);
 855         [DllImport("KERNEL32")] public static extern int EnumSystemCodePages(int lpCodePageEnumProc, int dwFlags);
 856         [DllImport("KERNEL32")] public static extern int EnumSystemLocales(int lpLocaleEnumProc, int dwFlags);
 857         [DllImport("KERNEL32")] public static extern int EnumTimeFormats(int lpTimeFmtEnumProc, int Locale, int dwFlags);
 858         [DllImport("KERNEL32")] public static extern int GetThreadLocale();
 859         [DllImport("KERNEL32")] public static extern int IsValidLocale(int Locale, int dwFlags);
 860         [DllImport("KERNEL32")] public static extern void ZeroMemory(IntPtr dest, int numBytes);
 861         [DllImport("kernel32")] public static extern COORD GetLargestConsoleWindowSize(HANDLE hConsoleOutput);
 862         [DllImport("kernel32")] public static extern int AllocConsole();
 863         [DllImport("kernel32")] public static extern int BackupRead(HANDLE hFile, Byte lpBuffer, int nNumberOfBytesToRead, ref int lpNumberOfBytesRead, int bAbort, int bProcessSecurity, IntPtr lpContext);
 864         [DllImport("kernel32")] public static extern int BackupSeek(HANDLE hFile, int dwLowBytesToSeek, int dwHighBytesToSeek, ref int lpdwLowByteSeeked, ref int lpdwHighByteSeeked, ref int lpContext);
 865         [DllImport("kernel32")] public static extern int BackupWrite(HANDLE hFile, Byte lpBuffer, int nNumberOfBytesToWrite, ref int lpNumberOfBytesWritten, int bAbort, int bProcessSecurity, ref int lpContext);
 866         [DllImport("kernel32")] public static extern int Beep(int dwFreq, int dwDuration);
 867         [DllImport("kernel32")] public static extern int BeginUpdateResource(string pFileName, int bDeleteExistingResources);
 868         [DllImport("kernel32")] public static extern int BuildCommDCB(string lpDef, ref DCB lpDCB);
 869         [DllImport("kernel32")] public static extern int BuildCommDCBAndTimeouts(string lpDef, ref DCB lpDCB, ref COMMTIMEOUTS lpCommTimeouts);
 870         [DllImport("kernel32")] public static extern int CallNamedPipe(string lpNamedPipeName, IntPtr lpInBuffer, int nInBufferSize, IntPtr lpOutBuffer, int nOutBufferSize, ref int lpBytesRead, int nTimeOut);
 871         [DllImport("kernel32")] public static extern int ClearCommBreak(int nCid);
 872         [DllImport("kernel32")] public static extern int ClearCommError(HANDLE hFile, ref int lpErrors, ref COMSTAT lpStat);
 873         [DllImport("kernel32")] public static extern int CloseHandle(HANDLE hObject);
 874         [DllImport("kernel32")] public static extern int CommConfigDialog(string lpszName, HWND hwnd, ref COMMCONFIG lpCC);
 875         [DllImport("kernel32")] public static extern int CompareFileTime(ref FILETIME lpFileTime1, ref FILETIME lpFileTime2);
 876         [DllImport("kernel32")] public static extern int CompareString(int Locale, int dwCmpFlags, string lpString1, int cchCount1, string lpString2, int cchCount2);
 877         [DllImport("kernel32")] public static extern int ConnectNamedPipe(HANDLE hNamedPipe, ref OVERLAPPED lpOverlapped);
 878         [DllImport("kernel32")] public static extern int ContinueDebugEvent(int dwProcessId, int dwThreadId, int dwContinueStatus);
 879         [DllImport("kernel32")] public static extern int CopyFile(string lpExistingFileName, string lpNewFileName, int bFailIfExists);
 880         [DllImport("kernel32")] public static extern int CreateConsoleScreenBuffer(int dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int dwFlags, IntPtr lpScreenBufferData);
 881         [DllImport("kernel32")] public static extern int CreateDirectory(string lpPathName, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
 882         [DllImport("kernel32")] public static extern int CreateDirectoryEx(string lpTemplateDirectory, string lpNewDirectory, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
 883         [DllImport("kernel32")] public static extern int CreateEvent(ref SECURITY_ATTRIBUTES lpEventAttributes, int bManualReset, int bInitialState, string lpName);
 884         [DllImport("kernel32")] public static extern int CreateFile(string lpFileName, int dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, HANDLE hTemplateFile);
 885         [DllImport("kernel32")] public static extern int CreateFileMapping(HANDLE hFile, ref SECURITY_ATTRIBUTES lpFileMappigAttributes, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, string lpName);
 886         [DllImport("kernel32")] public static extern int CreateIoCompletionPort(int FileHandle, int ExistingCompletionPort, int CompletionKey, int NumberOfConcurrentThreads);
 887         [DllImport("kernel32")] public static extern int CreateMailslot(string lpName, int nMaxMessageSize, int lReadTimeout, ref SECURITY_ATTRIBUTES lpSecurityAttributes);
 888         [DllImport("kernel32")] public static extern int CreateMutex(ref SECURITY_ATTRIBUTES lpMutexAttributes, int bInitialOwner, string lpName);
 889         [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);
 890         [DllImport("kernel32")] public static extern int CreatePipe(int phReadPipe, int phWritePipe, ref SECURITY_ATTRIBUTES lpPipeAttributes, int nSize);
 891         [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);
 892         [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);
 893         [DllImport("kernel32")] public static extern int CreateSemaphore(ref SECURITY_ATTRIBUTES lpSemaphoreAttributes, int lInitialCount, int lMaximumCount, string lpName);
 894         [DllImport("kernel32")] public static extern int CreateTapePartition(HANDLE hDevice, int dwPartitionMethod, int dwCount, int dwSize);
 895         [DllImport("kernel32")] public static extern int CreateThread(ref SECURITY_ATTRIBUTES lpThreadAttributes, int dwStackSize, ref int lpStartAddress, IntPtr lpParameter, int dwCreationFlags, ref int lpThreadId);
 896         [DllImport("kernel32")] public static extern int DebugActiveProcess(int dwProcessId);
 897         [DllImport("kernel32")] public static extern int DefineDosDevice(int dwFlags, string lpDeviceName, string lpTargetPath);
 898         [DllImport("kernel32")] public static extern int DeleteFile(string lpFileName);
 899         [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);
 900         [DllImport("kernel32")] public static extern int DisableThreadLibraryCalls(HANDLE hLibModule);
 901         [DllImport("kernel32")] public static extern int DisconnectNamedPipe(HANDLE hNamedPipe);
 902         [DllImport("kernel32")] public static extern int DosDateTimeToFileTime(int wFatDate, int wFatTime, ref FILETIME lpFileTime);
 903         [DllImport("kernel32")] public static extern int DuplicateHandle(HANDLE hSourceProcessHandle, HANDLE hSourceHandle, HANDLE hTargetProcessHandle, ref int lpTargetHandle, int dwDesiredAccess, int bInheritHandle, int dwOptions);
 904         [DllImport("kernel32")] public static extern int EndUpdateResource(HANDLE hUpdate, int fDiscard);
 905         [DllImport("kernel32")] public static extern int EnumCalendarInfo(int lpCalInfoEnumProc, int Locale, int Calendar, int CalType);
 906         [DllImport("kernel32")] public static extern int EnumResourceLanguages(HANDLE hModule, string lpType, string lpName, ref int lpEnumFunc, int lParam);
 907         [DllImport("kernel32")] public static extern int EnumResourceNames(HANDLE hModule, string lpType, ref int lpEnumFunc, int lParam);
 908         [DllImport("kernel32")] public static extern int EnumResourceTypes(HANDLE hModule, ref int lpEnumFunc, int lParam);
 909         [DllImport("kernel32")] public static extern int EraseTape(HANDLE hDevice, int dwEraseType, int bimmediate);
 910         [DllImport("kernel32")] public static extern int EscapeCommFunction(int nCid, int nFunc);
 911         [DllImport("kernel32")] public static extern int ExpandEnvironmentStrings(string lpSrc, string lpDst, int nSize);
 912         [DllImport("kernel32")] public static extern int FileTimeToDosDateTime(ref FILETIME lpFileTime, ref int lpFatDate, ref int lpFatTime);
 913         [DllImport("kernel32")] public static extern int FileTimeToLocalFileTime(ref FILETIME lpFileTime, ref FILETIME lpLocalFileTime);
 914         [DllImport("kernel32")] public static extern int FileTimeToSystemTime(ref FILETIME lpFileTime, ref SYSTEMTIME lpSystemTime);
 915         [DllImport("kernel32")] public static extern int FillConsoleOutputAttribute(HANDLE hConsoleOutput, int wAttribute, int nLength, COORD dwWriteCoord, ref int lpNumberOfAttrsWritten);
 916         [DllImport("kernel32")] public static extern int FillConsoleOutputCharacter(HANDLE hConsoleOutput, Byte cCharacter, int nLength, COORD dwWriteCoord, ref int lpNumberOfCharsWritten);
 917         [DllImport("kernel32")] public static extern int FindClose(HANDLE hFindFile);
 918         [DllImport("kernel32")] public static extern int FindCloseChangeNotification(HANDLE hChangeHandle);
 919         [DllImport("kernel32")] public static extern int FindFirstChangeNotification(string lpPathName, int bWatchSubtree, int dwNotifyFilter);
 920         [DllImport("kernel32")] public static extern int FindFirstFile(string lpFileName, WIN32_FIND_DATA lpFindFileData);
 921         [DllImport("kernel32")] public static extern int FindNextChangeNotification(HANDLE hChangeHandle);
 922         [DllImport("kernel32")] public static extern int FindNextFile(HANDLE hFindFile, WIN32_FIND_DATA lpFindFileData);
 923         [DllImport("kernel32")] public static extern int FindResource(HANDLE hInstance, string lpName, string lpType);
 924         [DllImport("kernel32")] public static extern int FindResourceEx(HANDLE hModule, string lpType, string lpName, int wLanguage);
 925         [DllImport("kernel32")] public static extern int FlushConsoleInputBuffer(HANDLE hConsoleInput);
 926         [DllImport("kernel32")] public static extern int FlushFileBuffers(HANDLE hFile);
 927         [DllImport("kernel32")] public static extern int FlushInstructionCache(HANDLE hProcess, IntPtr lpBaseAddress, int dwSize);
 928         [DllImport("kernel32")] public static extern int FlushViewOfFile(IntPtr lpBaseAddress, int dwNumberOfBytesToFlush);
 929         [DllImport("kernel32")] public static extern int FoldString(int dwMapFlags, string lpSrcStr, int cchSrc, string lpDestStr, int cchDest);
 930         [DllImport("kernel32")] public static extern int FormatMessage(int dwFlags, IntPtr lpSource, int dwMessageId, int dwLanguageId, string lpBuffer, int nSize, int Arguments);
 931         [DllImport("kernel32")] public static extern int FreeConsole();
 932         [DllImport("kernel32")] public static extern int FreeEnvironmentStrings(string lpsz);
 933         [DllImport("kernel32")] public static extern int FreeLibrary(HANDLE hLibModule);
 934         [DllImport("kernel32")] public static extern int FreeResource(HANDLE hResData);
 935         [DllImport("kernel32")] public static extern int GenerateConsoleCtrlEvent(int dwCtrlEvent, int dwProcessGroupId);
 936         [DllImport("kernel32")] public static extern int GetACP();
 937         [DllImport("kernel32")] public static extern int GetBinaryType(string lpApplicationName, ref int lpBinaryType);
 938         [DllImport("kernel32")] public static extern int GetCPInfo(int CodePage, ref CPINFO lpCPInfo);
 939         [DllImport("kernel32")] public static extern int GetCommConfig(HANDLE hCommDev, ref COMMCONFIG lpCC, ref int lpdwSize);
 940         [DllImport("kernel32")] public static extern int GetCommMask(HANDLE hFile, ref int lpEvtMask);
 941         [DllImport("kernel32")] public static extern int GetCommModemStatus(HANDLE hFile, ref int lpModemStat);
 942         [DllImport("kernel32")] public static extern int GetCommProperties(HANDLE hFile, ref COMMPROP lpCommProp);
 943         [DllImport("kernel32")] public static extern int GetCommState(int nCid, ref DCB lpDCB);
 944         [DllImport("kernel32")] public static extern int GetCommTimeouts(HANDLE hFile, ref COMMTIMEOUTS lpCommTimeouts);
 945         [DllImport("kernel32")] public static extern int GetCommandLine();
 946         [DllImport("kernel32")] public static extern int GetCompressedFileSize(string lpFileName, ref int lpFileSizeHigh);
 947         [DllImport("kernel32")] public static extern int GetComputerName(string lpBuffer, int nSize);
 948         [DllImport("kernel32")] public static extern int GetConsoleCP();
 949         [DllImport("kernel32")] public static extern int GetConsoleCursorInfo(HANDLE hConsoleOutput, ref CONSOLE_CURSOR_INFO lpConsoleCursorInfo);
 950         [DllImport("kernel32")] public static extern int GetConsoleMode(HANDLE hConsoleHandle, ref int lpMode);
 951         [DllImport("kernel32")] public static extern int GetConsoleOutputCP();
 952         [DllImport("kernel32")] public static extern int GetConsoleScreenBufferInfo(HANDLE hConsoleOutput, ref CONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
 953         [DllImport("kernel32")] public static extern int GetConsoleTitle(string lpConsoleTitle, int nSize);
 954         [DllImport("kernel32")] public static extern int GetCurrencyFormat(int Locale, int dwFlags, string lpValue, ref CURRENCYFMT lpFormat, string lpCurrencyStr, int cchCurrency);
 955         [DllImport("kernel32")] public static extern int GetCurrentDirectory(int nBufferLength, string lpBuffer);
 956         [DllImport("kernel32")] public static extern int GetCurrentProcess();
 957         [DllImport("kernel32")] public static extern int GetCurrentProcessId();
 958         [DllImport("kernel32")] public static extern int GetCurrentThread();
 959         [DllImport("kernel32")] public static extern int GetCurrentThreadId();
 960         [DllImport("kernel32")] public static extern int GetCurrentTime();
 961         [DllImport("kernel32")] public static extern int GetDateFormat(int Locale, int dwFlags, ref SYSTEMTIME lpDate, string lpFormat, string lpDateStr, int cchDate);
 962         [DllImport("kernel32")] public static extern int GetDefaultCommConfig(string lpszName, ref COMMCONFIG lpCC, ref int lpdwSize);
 963         [DllImport("kernel32")] public static extern int GetDiskFreeSpace(string lpRootPathName, ref int lpSectorsPerCluster, ref int lpBytesPerSector, ref int lpNumberOfFreeClusters, ref int lpTotalNumberOfClusters);
 964         [DllImport("kernel32")] public static extern int GetDriveType(string nDrive);
 965         [DllImport("kernel32")] public static extern int GetEnvironmentVariable(string lpName, string lpBuffer, int nSize);
 966         [DllImport("kernel32")] public static extern int GetExitCodeProcess(HANDLE hProcess, ref int lpExitCode);
 967         [DllImport("kernel32")] public static extern int GetExitCodeThread(HANDLE hThread, ref int lpExitCode);
 968         [DllImport("kernel32")] public static extern int GetFileAttributes(string lpFileName);
 969         [DllImport("kernel32")] public static extern int GetFileInformationByHandle(HANDLE hFile, ref BY_HANDLE_FILE_INFORMATION lpFileInformation);
 970         [DllImport("kernel32")] public static extern int GetFileSize(HANDLE hFile, ref int lpFileSizeHigh);
 971         [DllImport("kernel32")] public static extern int GetFileTime(HANDLE hFile, ref FILETIME lpCreationTime, ref FILETIME lpLastAccessTime, ref FILETIME lpLastWriteTime);
 972         [DllImport("kernel32")] public static extern int GetFileType(HANDLE hFile);
 973         [DllImport("kernel32")] public static extern int GetFullPathName(string lpFileName, int nBufferLength, StringBuilder lpBuffer, string lpFilePart);
 974         [DllImport("kernel32")] public static extern int GetHandleInformation(HANDLE hObject, ref int lpdwFlags);
 975         [DllImport("kernel32")] public static extern int GetLastError();
 976         [DllImport("kernel32")] public static extern int GetLocaleInfo(int Locale, int LCType, string lpLCData, int cchData);
 977         [DllImport("kernel32")] public static extern int GetLogicalDriveStrings(int nBufferLength, StringBuilder lpBuffer);
 978         [DllImport("kernel32")] public static extern int GetLogicalDrives();
 979         [DllImport("kernel32")] public static extern int GetMailslotInfo(HANDLE hMailslot, ref int lpMaxMessageSize, ref int lpNextSize, ref int lpMessageCount, ref int lpReadTimeout);
 980         [DllImport("kernel32")] public static extern int GetModuleFileName(HANDLE hModule, StringBuilder lpFileName, int nSize);
 981         [DllImport("kernel32")] public static extern int GetModuleHandle(string lpModuleName);
 982         [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);
 983         [DllImport("kernel32")] public static extern int GetNamedPipeInfo(HANDLE hNamedPipe, ref int lpFlags, ref int lpOutBufferSize, ref int lpInBufferSize, ref int lpMaxInstances);
 984         [DllImport("kernel32")] public static extern int GetNumberFormat(int Locale, int dwFlags, string lpValue, ref NUMBERFMT lpFormat, string lpNumberStr, int cchNumber);
 985         [DllImport("kernel32")] public static extern int GetNumberOfConsoleInputEvents(HANDLE hConsoleInput, ref int lpNumberOfEvents);
 986         [DllImport("kernel32")] public static extern int GetNumberOfConsoleMouseButtons(int lpNumberOfMouseButtons);
 987         [DllImport("kernel32")] public static extern int GetOEMCP();
 988         [DllImport("kernel32")] public static extern int GetOverlappedResult(HANDLE hFile, ref OVERLAPPED lpOverlapped, ref int lpNumberOfBytesTransferred, int bWait);
 989         [DllImport("kernel32")] public static extern int GetPriorityClass(HANDLE hProcess);
 990         [DllImport("kernel32")] public static extern int GetPrivateProfileInt(string lpApplicationName, string lpKeyName, int nDefault, string lpFileName);
 991         [DllImport("kernel32")] public static extern int GetPrivateProfileSection(string lpAppName, StringBuilder lpReturnedString, int nSize, string lpFileName);
 992         [DllImport("kernel32")] public static extern int GetPrivateProfileString(string lpApplicationName, IntPtr lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);
 993         [DllImport("kernel32")] public static extern int GetPrivateProfileString(string lpApplicationName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);
 994         [DllImport("kernel32")] public static extern int GetProcessAffinityMask(HANDLE hProcess, ref int lpProcessAffinityMask, int SystemAffinityMask);
 995         [DllImport("kernel32")] public static extern int GetProcessHeap();
 996         [DllImport("kernel32")] public static extern int GetProcessHeaps(int NumberOfHeaps, int ProcessHeaps);
 997         [DllImport("kernel32")] public static extern int GetProcessShutdownParameters(int lpdwLevel, ref int lpdwFlags);
 998         [DllImport("kernel32")] public static extern int GetProcessTimes(HANDLE hProcess, ref FILETIME lpCreationTime, ref FILETIME lpExitTime, ref FILETIME lpKernelTime, ref FILETIME lpUserTime);
 999         [DllImport("kernel32")] public static extern int GetProcessWorkingSetSize(HANDLE hProcess, ref int lpMinimumWorkingSetSize, ref int lpMaximumWorkingSetSize);
1000         [DllImport("kernel32")] public static extern int GetProfileInt(string lpAppName, string lpKeyName, int nDefault);
1001         [DllImport("kernel32")] public static extern int GetProfileSection(string lpAppName, string lpReturnedString, int nSize);
1002         [DllImport("kernel32")] public static extern int GetProfileString(string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize);
1003         [DllImport("kernel32")] public static extern int GetQueuedCompletionStatus(int CompletionPort, ref int lpNumberOfBytesTransferred, ref int lpCompletionKey, ref int lpOverlapped, int dwMilliseconds);
1004         [DllImport("kernel32")] public static extern int GetShortPathName(string lpszLongPath, string lpszShortPath, int cchBuffer);
1005         [DllImport("kernel32")] public static extern int GetStdHandle(int nStdHandle);
1006         [DllImport("kernel32")] public static extern int GetStringTypeA(int lcid, int dwInfoType, string lpSrcStr, int cchSrc, ref int lpCharType);
1007         [DllImport("kernel32")] public static extern int GetStringTypeEx(int Locale, int dwInfoType, string lpSrcStr, int cchSrc, short lpCharType);
1008         [DllImport("kernel32")] public static extern int GetStringTypeW(int dwInfoType, string lpSrcStr, int cchSrc, short lpCharType);
1009         [DllImport("kernel32")] public static extern int GetSystemDefaultLCID();
1010         [DllImport("kernel32")] public static extern int GetSystemDirectory(StringBuilder lpBuffer, int nSize);
1011         [DllImport("kernel32")] public static extern int GetSystemPowerStatus(ref SYSTEM_POWER_STATUS lpSystemPowerStatus);
1012         [DllImport("kernel32")] public static extern int GetSystemTimeAdjustment(int lpTimeAdjustment, ref int lpTimeIncrement, ref int lpTimeAdjustmentDisabled);
1013         [DllImport("kernel32")] public static extern int GetTapeParameters(HANDLE hDevice, int dwOperation, ref int lpdwSize, IntPtr lpTapeInformation);
1014         [DllImport("kernel32")] public static extern int GetTapePosition(HANDLE hDevice, int dwPositionType, ref int lpdwPartition, ref int lpdwOffsetLow, ref int lpdwOffsetHigh);
1015         [DllImport("kernel32")] public static extern int GetTapeStatus(HANDLE hDevice);
1016         [DllImport("kernel32")] public static extern int GetTempFileName(string lpszPath, string lpPrefixString, int wUnique, StringBuilder lpTempFileName);
1017         [DllImport("kernel32")] public static extern int GetTempPath(int nBufferLength, StringBuilder lpBuffer);
1018         [DllImport("kernel32")] public static extern int GetThreadContext(HANDLE hThread, ref CONTEXT lpContext);
1019         [DllImport("kernel32")] public static extern int GetThreadPriority(HANDLE hThread);
1020         [DllImport("kernel32")] public static extern int GetThreadSelectorEntry(HANDLE hThread, int dwSelector, ref LDT_ENTRY lpSelectorEntry);
1021         [DllImport("kernel32")] public static extern int GetThreadTimes(HANDLE hThread, ref FILETIME lpCreationTime, ref FILETIME lpExitTime, ref FILETIME lpKernelTime, ref FILETIME lpUserTime);
1022         [DllImport("kernel32")] public static extern int GetTickCount();
1023         [DllImport("kernel32")] public static extern int GetTimeFormat(int Locale, int dwFlags, ref SYSTEMTIME lpTime, string lpFormat, string lpTimeStr, int cchTime);
1024         [DllImport("kernel32")] public static extern int GetTimeZoneInformation(ref TIME_ZONE_INFORMATION lpTimeZoneInformation);
1025         [DllImport("kernel32")] public static extern int GetUserDefaultLCID();
1026         [DllImport("kernel32")] public static extern int GetVersion();
1027         [DllImport("kernel32")] public static extern int GetVersionEx(ref OSVERSIONINFO lpVersionInformation);
1028         [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);
1029         [DllImport("kernel32")] public static extern int GetWindowsDirectory(StringBuilder lpBuffer, int nSize);
1030         [DllImport("kernel32")] public static extern int GlobalAlloc(int wFlags, int dwBytes);
1031         [DllImport("kernel32")] public static extern int GlobalCompact(int dwMinFree);
1032         [DllImport("kernel32")] public static extern int GlobalFlags(HANDLE hMem);
1033         [DllImport("kernel32")] public static extern int GlobalFree(HANDLE hMem);
1034         [DllImport("kernel32")] public static extern int GlobalGetAtomName(short nAtom, string lpBuffer, int nSize);
1035         [DllImport("kernel32")] public static extern int GlobalHandle(IntPtr wMem);
1036         [DllImport("kernel32")] public static extern int GlobalLock(HANDLE hMem);
1037         [DllImport("kernel32")] public static extern int GlobalReAlloc(HANDLE hMem, int dwBytes, int wFlags);
1038         [DllImport("kernel32")] public static extern int GlobalSize(HANDLE hMem);
1039         [DllImport("kernel32")] public static extern int GlobalUnWire(HANDLE hMem);
1040         [DllImport("kernel32")] public static extern int GlobalUnlock(HANDLE hMem);
1041         [DllImport("kernel32")] public static extern int GlobalWire(HANDLE hMem);
1042         [DllImport("kernel32")] public static extern int HeapAlloc(HANDLE hHeap, int dwFlags, int dwBytes);
1043         [DllImport("kernel32")] public static extern int HeapCompact(HANDLE hHeap, int dwFlags);
1044         [DllImport("kernel32")] public static extern int HeapCreate(int flOptions, int dwInitialSize, int dwMaximumSize);
1045         [DllImport("kernel32")] public static extern int HeapDestroy(HANDLE hHeap);
1046         [DllImport("kernel32")] public static extern int HeapFree(HANDLE hHeap, int dwFlags, IntPtr lpMem);
1047         [DllImport("kernel32")] public static extern int HeapLock(HANDLE hHeap);
1048         [DllImport("kernel32")] public static extern int HeapReAlloc(HANDLE hHeap, int dwFlags, IntPtr lpMem, int dwBytes);
1049         [DllImport("kernel32")] public static extern int HeapSize(HANDLE hHeap, int dwFlags, IntPtr lpMem);
1050         [DllImport("kernel32")] public static extern int HeapUnlock(HANDLE hHeap);
1051         [DllImport("kernel32")] public static extern int HeapValidate(HANDLE hHeap, int dwFlags, IntPtr lpMem);
1052         [DllImport("kernel32")] public static extern int InitAtomTable(int nSize);
1053         [DllImport("kernel32")] public static extern int InterlockedDecrement(int lpAddend);
1054         [DllImport("kernel32")] public static extern int InterlockedExchange(int Target, int Value);
1055         [DllImport("kernel32")] public static extern int InterlockedIncrement(int lpAddend);
1056         [DllImport("kernel32")] public static extern int IsBadCodePtr(int lpfn);
1057         [DllImport("kernel32")] public static extern int IsBadHugeReadPtr(IntPtr lp, int ucb);
1058         [DllImport("kernel32")] public static extern int IsBadHugeWritePtr(IntPtr lp, int ucb);
1059         [DllImport("kernel32")] public static extern int IsBadReadPtr(IntPtr lp, int ucb);
1060         [DllImport("kernel32")] public static extern int IsBadStringPtr(string lpsz, int ucchMax);
1061         [DllImport("kernel32")] public static extern int IsBadWritePtr(IntPtr lp, int ucb);
1062         [DllImport("kernel32")] public static extern int IsDBCSLeadByte(Byte bTestChar);
1063         [DllImport("kernel32")] public static extern int IsValidCodePage(int CodePage);
1064         [DllImport("kernel32")] public static extern int LCMapString(int Locale, int dwMapFlags, string lpSrcStr, int cchSrc, string lpDestStr, int cchDest);
1065         [DllImport("kernel32")] public static extern int LoadLibrary(string lpLibFileName);
1066         [DllImport("kernel32")] public static extern int LoadLibraryEx(string lpLibFileName, HANDLE hFile, int dwFlags);
1067         [DllImport("kernel32")] public static extern int LoadModule(string lpModuleName, IntPtr lpParameterBlock);
1068         [DllImport("kernel32")] public static extern int LoadResource(HANDLE hInstance, HANDLE hResInfo);
1069         [DllImport("kernel32")] public static extern int LocalAlloc(int wFlags, int wBytes);
1070         [DllImport("kernel32")] public static extern int LocalCompact(int uMinFree);
1071         [DllImport("kernel32")] public static extern int LocalFileTimeToFileTime(ref FILETIME lpLocalFileTime, ref FILETIME lpFileTime);
1072         [DllImport("kernel32")] public static extern int LocalFlags(HANDLE hMem);
1073         [DllImport("kernel32")] public static extern int LocalFree(HANDLE hMem);
1074         [DllImport("kernel32")] public static extern int LocalHandle(HANDLE hMem);
1075         [DllImport("kernel32")] public static extern int LocalLock(HANDLE hMem);
1076         [DllImport("kernel32")] public static extern int LocalReAlloc(HANDLE hMem, int wBytes, int wFlags);
1077         [DllImport("kernel32")] public static extern int LocalShrink(HANDLE hMem, int cbNewSize);
1078         [DllImport("kernel32")] public static extern int LocalSize(HANDLE hMem);
1079         [DllImport("kernel32")] public static extern int LocalUnlock(HANDLE hMem);
1080         [DllImport("kernel32")] public static extern int LockFile(HANDLE hFile, int dwFileOffsetLow, int dwFileOffsetHigh, int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh);
1081         [DllImport("kernel32")] public static extern int LockFileEx(HANDLE hFile, int dwFlags, int dwReserved, int nNumberOfBytesToLockLow, int nNumberOfBytesToLockHigh, ref OVERLAPPED lpOverlapped);
1082         [DllImport("kernel32")] public static extern int LockResource(HANDLE hResData);
1083         [DllImport("kernel32")] public static extern int MapViewOfFile(HANDLE hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap);
1084         [DllImport("kernel32")] public static extern int MapViewOfFileEx(HANDLE hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap, IntPtr lpBaseAddress);
1085         [DllImport("kernel32")] public static extern int MoveFile(string lpExistingFileName, string lpNewFileName);
1086         [DllImport("kernel32")] public static extern int MoveFileEx(string lpExistingFileName, string lpNewFileName, int dwFlags);
1087         [DllImport("kernel32")] public static extern int MulDiv(int nNumber, int nNumerator, int nDenominator);
1088         [DllImport("kernel32")] public static extern int MultiByteToWideChar(int CodePage, int dwFlags, string lpMultiByteStr, int cchMultiByte, string lpWideCharStr, int cchWideChar);
1089         [DllImport("kernel32")] public static extern int OpenEvent(int dwDesiredAccess, int bInheritHandle, string lpName);
1090         [DllImport("kernel32")] public static extern int OpenFile(string lpFileName, ref OFSTRUCT lpReOpenBuff, int wStyle);
1091         [DllImport("kernel32")] public static extern int OpenFileMapping(int dwDesiredAccess, int bInheritHandle, string lpName);
1092         [DllImport("kernel32")] public static extern int OpenMutex(int dwDesiredAccess, int bInheritHandle, string lpName);
1093         [DllImport("kernel32")] public static extern int OpenProcess(int dwDesiredAccess, int bInheritHandle, int dwProcessId);
1094         [DllImport("kernel32")] public static extern int OpenSemaphore(int dwDesiredAccess, int bInheritHandle, string lpName);
1095         [DllImport("kernel32")] public static extern int PeekNamedPipe(HANDLE hNamedPipe, IntPtr lpBuffer, int nBufferSize, ref int lpBytesRead, ref int lpTotalBytesAvail, ref int lpBytesLeftThisMessage);
1096         [DllImport("kernel32")] public static extern int PrepareTape(HANDLE hDevice, int dwOperation, int bimmediate);
1097         [DllImport("kernel32")] public static extern int PulseEvent(HANDLE hEvent);
1098         [DllImport("kernel32")] public static extern int PurgeComm(HANDLE hFile, int dwFlags);
1099         [DllImport("kernel32")] public static extern int QueryDosDevice(string lpDeviceName, string lpTargetPath, int ucchMax);
1100         [DllImport("kernel32")] public static extern int QueryPerformanceCounter(ref LARGE_INTEGER lpPerformanceCount);
1101         [DllImport("kernel32")] public static extern int QueryPerformanceFrequency(ref LARGE_INTEGER lpFrequency);
1102         [DllImport("kernel32")] public static extern int ReadConsole(HANDLE hConsoleInput, IntPtr lpBuffer, int nNumberOfCharsToRead, ref int lpNumberOfCharsRead, IntPtr lpReserved);
1103         [DllImport("kernel32")] public static extern int ReadConsoleOutput(HANDLE hConsoleOutput, ref CHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, ref SMALL_RECT lpReadRegion);
1104         [DllImport("kernel32")] public static extern int ReadConsoleOutputAttribute(HANDLE hConsoleOutput, ref int lpAttribute, int nLength, COORD dwReadCoord, ref int lpNumberOfAttrsRead);
1105         [DllImport("kernel32")] public static extern int ReadConsoleOutputCharacter(HANDLE hConsoleOutput, string lpCharacter, int nLength, COORD dwReadCoord, ref int lpNumberOfCharsRead);
1106         [DllImport("kernel32")] public static extern int ReadFile(HANDLE hFile, IntPtr lpBuffer, int nNumberOfBytesToRead, ref int lpNumberOfBytesRead, ref OVERLAPPED lpOverlapped);
1107         [DllImport("kernel32")] public static extern int ReadFileEx(HANDLE hFile, IntPtr lpBuffer, int nNumberOfBytesToRead, ref OVERLAPPED lpOverlapped, ref int lpCompletionRoutine);
1108         [DllImport("kernel32")] public static extern int ReadProcessMemory(HANDLE hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, ref int lpNumberOfBytesWritten);
1109         [DllImport("kernel32")] public static extern int ReleaseMutex(HANDLE hMutex);
1110         [DllImport("kernel32")] public static extern int ReleaseSemaphore(HANDLE hSemaphore, int lReleaseCount, ref int lpPreviousCount);
1111         [DllImport("kernel32")] public static extern int RemoveDirectory(string lpPathName);
1112         [DllImport("kernel32")] public static extern int ResetEvent(HANDLE hEvent);
1113         [DllImport("kernel32")] public static extern int ResumeThread(HANDLE hThread);
1114         [DllImport("kernel32")] public static extern int ScrollConsoleScreenBuffer(HANDLE hConsoleOutput, ref SMALL_RECT lpScrollRectangle, ref SMALL_RECT lpClipRectangle, COORD dwDestinationOrigin, ref CHAR_INFO lpFill);
1115         [DllImport("kernel32")] public static extern int SearchPath(string lpPath, string lpFileName, string lpExtension, int nBufferLength, string lpBuffer, string lpFilePart);
1116         [DllImport("kernel32")] public static extern int SetCommBreak(int nCid);
1117         [DllImport("kernel32")] public static extern int SetCommConfig(HANDLE hCommDev, ref COMMCONFIG lpCC, int dwSize);
1118         [DllImport("kernel32")] public static extern int SetCommMask(HANDLE hFile, int dwEvtMask);
1119         [DllImport("kernel32")] public static extern int SetCommState(HANDLE hCommDev, ref DCB lpDCB);
1120         [DllImport("kernel32")] public static extern int SetCommTimeouts(HANDLE hFile, ref COMMTIMEOUTS lpCommTimeouts);
1121         [DllImport("kernel32")] public static extern int SetComputerName(string lpComputerName);
1122         [DllImport("kernel32")] public static extern int SetConsoleActiveScreenBuffer(HANDLE hConsoleOutput);
1123         [DllImport("kernel32")] public static extern int SetConsoleCP(int wCodePageID);
1124         [DllImport("kernel32")] public static extern int SetConsoleCtrlHandler(int HandlerRoutine, int Add);
1125         [DllImport("kernel32")] public static extern int SetConsoleCursorInfo(HANDLE hConsoleOutput, ref CONSOLE_CURSOR_INFO lpConsoleCursorInfo);
1126         [DllImport("kernel32")] public static extern int SetConsoleCursorPosition(HANDLE hConsoleOutput, COORD dwCursorPosition);
1127         [DllImport("kernel32")] public static extern int SetConsoleMode(HANDLE hConsoleHandle, int dwMode);
1128         [DllImport("kernel32")] public static extern int SetConsoleOutputCP(int wCodePageID);
1129         [DllImport("kernel32")] public static extern int SetConsoleScreenBufferSize(HANDLE hConsoleOutput, COORD dwSize);
1130         [DllImport("kernel32")] public static extern int SetConsoleTextAttribute(HANDLE hConsoleOutput, int wAttributes);
1131         [DllImport("kernel32")] public static extern int SetConsoleTitle(string lpConsoleTitle);
1132         [DllImport("kernel32")] public static extern int SetConsoleWindowInfo(HANDLE hConsoleOutput, int bAbsolute, ref SMALL_RECT lpConsoleWindow);
1133         [DllImport("kernel32")] public static extern int SetCurrentDirectory(string lpPathName);
1134         [DllImport("kernel32")] public static extern int SetDefaultCommConfig(string lpszName, ref COMMCONFIG lpCC, int dwSize);
1135         [DllImport("kernel32")] public static extern int SetEndOfFile(HANDLE hFile);
1136         [DllImport("kernel32")] public static extern int SetEnvironmentVariable(string lpName, string lpValue);
1137         [DllImport("kernel32")] public static extern int SetErrorMode(int wMode);
1138         [DllImport("kernel32")] public static extern int SetEvent(HANDLE hEvent);
1139         [DllImport("kernel32")] public static extern int SetFileAttributes(string lpFileName, int dwFileAttributes);
1140         [DllImport("kernel32")] public static extern int SetFilePointer(HANDLE hFile, int lDistanceToMove, ref int lpDistanceToMoveHigh, int dwMoveMethod);
1141         [DllImport("kernel32")] public static extern int SetFileTime(HANDLE hFile, ref FILETIME lpCreationTime, ref FILETIME lpLastAccessTime, ref FILETIME lpLastWriteTime);
1142         [DllImport("kernel32")] public static extern int SetHandleCount(int wNumber);
1143         [DllImport("kernel32")] public static extern int SetHandleInformation(HANDLE hObject, int dwMask, int dwFlags);
1144         [DllImport("kernel32")] public static extern int SetLocalTime(ref SYSTEMTIME lpSystemTime);
1145         [DllImport("kernel32")] public static extern int SetLocaleInfo(int Locale, int LCType, string lpLCData);
1146         [DllImport("kernel32")] public static extern int SetMailslotInfo(HANDLE hMailslot, int lReadTimeout);
1147         [DllImport("kernel32")] public static extern int SetNamedPipeHandleState(HANDLE hNamedPipe, ref int lpMode, ref int lpMaxCollectionCount, ref int lpCollectDataTimeout);
1148         [DllImport("kernel32")] public static extern int SetPriorityClass(HANDLE hProcess, int dwPriorityClass);
1149         [DllImport("kernel32")] public static extern int SetProcessShutdownParameters(int dwLevel, int dwFlags);
1150         [DllImport("kernel32")] public static extern int SetProcessWorkingSetSize(HANDLE hProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize);
1151         [DllImport("kernel32")] public static extern int SetStdHandle(int nStdHandle, int nHandle);
1152         [DllImport("kernel32")] public static extern int SetSystemPowerState(int fSuspend, int fForce);
1153         [DllImport("kernel32")] public static extern int SetSystemTime(ref SYSTEMTIME lpSystemTime);
1154         [DllImport("kernel32")] public static extern int SetTapeParameters(HANDLE hDevice, int dwOperation, IntPtr lpTapeInformation);
1155         [DllImport("kernel32")] public static extern int SetTapePosition(HANDLE hDevice, int dwPositionMethod, int dwPartition, int dwOffsetLow, int dwOffsetHigh, int bimmediate);
1156         [DllImport("kernel32")] public static extern int SetThreadAffinityMask(HANDLE hThread, int dwThreadAffinityMask);
1157         [DllImport("kernel32")] public static extern int SetThreadContext(HANDLE hThread, ref CONTEXT lpContext);
1158         [DllImport("kernel32")] public static extern int SetThreadLocale(int Locale);
1159         [DllImport("kernel32")] public static extern int SetThreadPriority(HANDLE hThread, int nPriority);
1160         [DllImport("kernel32")] public static extern int SetTimeZoneInformation(ref TIME_ZONE_INFORMATION lpTimeZoneInformation);
1161         [DllImport("kernel32")] public static extern int SetUnhandledExceptionFilter(int lpTopLevelExceptionFilter);
1162         [DllImport("kernel32")] public static extern int SetVolumeLabel(string lpRootPathName, string lpVolumeName);
1163         [DllImport("kernel32")] public static extern int SetupComm(HANDLE hFile, int dwInQueue, int dwOutQueue);
1164         [DllImport("kernel32")] public static extern int SizeofResource(HANDLE hInstance, HANDLE hResInfo);
1165         [DllImport("kernel32")] public static extern int SleepEx(int dwMilliseconds, int bAlertable);
1166         [DllImport("kernel32")] public static extern int SuspendThread(HANDLE hThread);
1167         [DllImport("kernel32")] public static extern int SystemTimeToFileTime(ref SYSTEMTIME lpSystemTime, ref FILETIME lpFileTime);
1168         [DllImport("kernel32")] public static extern int SystemTimeToTzSpecificLocalTime(ref TIME_ZONE_INFORMATION lpTimeZoneInformation, ref SYSTEMTIME lpUniversalTime, ref SYSTEMTIME lpLocalTime);
1169         [DllImport("kernel32")] public static extern int TerminateProcess(HANDLE hProcess, int uExitCode);
1170         [DllImport("kernel32")] public static extern int TerminateThread(HANDLE hThread, int dwExitCode);
1171         [DllImport("kernel32")] public static extern int TlsAlloc();
1172         [DllImport("kernel32")] public static extern int TlsFree(int dwTlsIndex);
1173         [DllImport("kernel32")] public static extern int TlsGetValue(int dwTlsIndex);
1174         [DllImport("kernel32")] public static extern int TlsSetValue(int dwTlsIndex, IntPtr lpTlsValue);
1175         [DllImport("kernel32")] public static extern int TransactNamedPipe(HANDLE hNamedPipe, IntPtr lpInBuffer, int nInBufferSize, IntPtr lpOutBuffer, int nOutBufferSize, ref int lpBytesRead, ref OVERLAPPED lpOverlapped);
1176         [DllImport("kernel32")] public static extern int TransmitCommChar(int nCid, Byte cChar);
1177         [DllImport("kernel32")] public static extern int UnhandledExceptionFilter(ref EXCEPTION_POINTERS ExceptionInfo);
1178         [DllImport("kernel32")] public static extern int UnlockFile(HANDLE hFile, int dwFileOffsetLow, int dwFileOffsetHigh, int nNumberOfBytesToUnlockLow, int nNumberOfBytesToUnlockHigh);
1179         [DllImport("kernel32")] public static extern int UnlockFileEx(HANDLE hFile, int dwReserved, int nNumberOfBytesToUnlockLow, int nNumberOfBytesToUnlockHigh, ref OVERLAPPED lpOverlapped);
1180         [DllImport("kernel32")] public static extern int UnmapViewOfFile(IntPtr lpBaseAddress);
1181         [DllImport("kernel32")] public static extern int UpdateResource(HANDLE hUpdate, string lpType, string lpName, int wLanguage, IntPtr lpData, int cbData);
1182         [DllImport("kernel32")] public static extern int VerLanguageName(int wLang, string szLang, int nSize);
1183         [DllImport("kernel32")] public static extern int VirtualAlloc(IntPtr lpAddress, int dwSize, int flAllocationType, int flProtect);
1184         [DllImport("kernel32")] public static extern int VirtualFree(IntPtr lpAddress, int dwSize, int dwFreeType);
1185         [DllImport("kernel32")] public static extern int VirtualLock(IntPtr lpAddress, int dwSize);
1186         [DllImport("kernel32")] public static extern int VirtualProtect(IntPtr lpAddress, int dwSize, int flNewProtect, ref int lpflOldProtect);
1187         [DllImport("kernel32")] public static extern int VirtualProtectEx(HANDLE hProcess, IntPtr lpAddress, int dwSize, int flNewProtect, ref int lpflOldProtect);
1188         [DllImport("kernel32")] public static extern int VirtualQuery(IntPtr lpAddress, ref MEMORY_BASIC_INFORMATION lpBuffer, int dwLength);
1189         [DllImport("kernel32")] public static extern int VirtualQueryEx(HANDLE hProcess, IntPtr lpAddress, ref MEMORY_BASIC_INFORMATION lpBuffer, int dwLength);
1190         [DllImport("kernel32")] public static extern int VirtualUnlock(IntPtr lpAddress, int dwSize);
1191         [DllImport("kernel32")] public static extern int WaitCommEvent(HANDLE hFile, ref int lpEvtMask, ref OVERLAPPED lpOverlapped);
1192         [DllImport("kernel32")] public static extern int WaitForMultipleObjects(int nCount, ref int lpHandles, int bWaitAll, int dwMilliseconds);
1193         [DllImport("kernel32")] public static extern int WaitForMultipleObjectsEx(int nCount, ref int lpHandles, int bWaitAll, int dwMilliseconds, int bAlertable);
1194         [DllImport("kernel32")] public static extern int WaitForSingleObject(HANDLE hHandle, int dwMilliseconds);
1195         [DllImport("kernel32")] public static extern int WaitForSingleObjectEx(HANDLE hHandle, int dwMilliseconds, int bAlertable);
1196         [DllImport("kernel32")] public static extern int WaitNamedPipe(string lpNamedPipeName, int nTimeOut);
1197         [DllImport("kernel32")] public static extern int WideCharToMultiByte(int CodePage, int dwFlags, string lpWideCharStr, int cchWideChar, string lpMultiByteStr, int cchMultiByte, string lpDefaultChar, ref int lpUsedDefaultChar);
1198         [DllImport("kernel32")] public static extern int WinExec(string lpCmdLine, int nCmdShow);
1199         [DllImport("kernel32")] public static extern int WriteConsole(HANDLE hConsoleOutput, IntPtr lpBuffer, int nNumberOfCharsToWrite, ref int lpNumberOfCharsWritten, IntPtr lpReserved);
1200         [DllImport("kernel32")] public static extern int WriteConsoleOutput(HANDLE hConsoleOutput, ref CHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, ref SMALL_RECT lpWriteRegion);
1201         [DllImport("kernel32")] public static extern int WriteConsoleOutputAttribute(HANDLE hConsoleOutput, short lpAttribute, int nLength, COORD dwWriteCoord, ref int lpNumberOfAttrsWritten);
1202         [DllImport("kernel32")] public static extern int WriteConsoleOutputCharacter(HANDLE hConsoleOutput, string lpCharacter, int nLength, COORD dwWriteCoord, ref int lpNumberOfCharsWritten);
1203         [DllImport("kernel32")] public static extern int WriteFile(HANDLE hFile, IntPtr lpBuffer, int nNumberOfBytesToWrite, ref int lpNumberOfBytesWritten, ref OVERLAPPED lpOverlapped);
1204         [DllImport("kernel32")] public static extern int WriteFileEx(HANDLE hFile, IntPtr lpBuffer, int nNumberOfBytesToWrite, ref OVERLAPPED lpOverlapped, ref int lpCompletionRoutine);
1205         [DllImport("kernel32")] public static extern int WritePrivateProfileSection(string lpAppName, string lpString, string lpFileName);
1206         [DllImport("kernel32")] public static extern int WritePrivateProfileString(string lpApplicationName, IntPtr lpKeyName, IntPtr lpString, string lpFileName);
1207         [DllImport("kernel32")] public static extern int WritePrivateProfileString(string lpApplicationName, string lpKeyName, IntPtr lpString, string lpFileName);
1208         [DllImport("kernel32")] public static extern int WriteProcessMemory(HANDLE hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, ref int lpNumberOfBytesWritten);
1209         [DllImport("kernel32")] public static extern int WriteProfileSection(string lpAppName, string lpString);
1210         [DllImport("kernel32")] public static extern int WriteProfileString(string lpszSection, string lpszKeyName, string lpszString);
1211         [DllImport("kernel32")] public static extern int WriteTapemark(HANDLE hDevice, int dwTapemarkType, int dwTapemarkCount, int bimmediate);
1212         [DllImport("kernel32")] public static extern int hread(HANDLE hFile, IntPtr lpBuffer, int lBytes);
1213         [DllImport("kernel32")] public static extern int hwrite(HANDLE hFile, string lpBuffer, int lBytes);
1214         [DllImport("kernel32")] public static extern int lclose(HANDLE hFile);
1215         [DllImport("kernel32")] public static extern int lcreat(string lpPathName, int iAttribute);
1216         [DllImport("kernel32")] public static extern int llseek(HANDLE hFile, int lOffset, int iOrigin);
1217         [DllImport("kernel32")] public static extern int lopen(string lpPathName, int iReadWrite);
1218         [DllImport("kernel32")] public static extern int lread(HANDLE hFile, IntPtr lpBuffer, int wBytes);
1219         [DllImport("kernel32")] public static extern int lstrcat(string lpString1, string lpString2);
1220         [DllImport("kernel32")] public static extern int lstrcmp(string lpString1, string lpString2);
1221         [DllImport("kernel32")] public static extern int lstrcmpi(string lpString1, string lpString2);
1222         [DllImport("kernel32")] public static extern int lstrcpy(string lpString1, string lpString2);
1223         [DllImport("kernel32")] public static extern int lstrcpyn(string lpString1, string lpString2, int iMaxLength);
1224         [DllImport("kernel32")] public static extern int lstrlen(string lpString);
1225         [DllImport("kernel32")] public static extern int lwrite(HANDLE hFile, string lpBuffer, int wBytes);
1226         [DllImport("kernel32")] public static extern short GetSystemDefaultLangID();
1227         [DllImport("kernel32")] public static extern short GetUserDefaultLangID();
1228         [DllImport("kernel32")] public static extern short GlobalAddAtom(string lpString);
1229         [DllImport("kernel32")] public static extern short GlobalDeleteAtom(short nAtom);
1230         [DllImport("kernel32")] public static extern short GlobalFindAtom(string lpString);
1231         [DllImport("kernel32")] public static extern string GetEnvironmentStrings();
1232         [DllImport("kernel32")] public static extern void CopyMemory(IntPtr Destination, IntPtr Source, int Length);
1233         [DllImport("kernel32")] public static extern void DebugBreak();
1234         [DllImport("kernel32")] public static extern void DeleteCriticalSection(ref CRITICAL_SECTION lpCriticalSection);
1235         [DllImport("kernel32")] public static extern void EnterCriticalSection(ref CRITICAL_SECTION lpCriticalSection);
1236         [DllImport("kernel32")] public static extern void ExitProcess(int uExitCode);
1237         [DllImport("kernel32")] public static extern void ExitThread(int dwExitCode);
1238         [DllImport("kernel32")] public static extern void FatalAppExit(int uAction, string lpMessageText);
1239         [DllImport("kernel32")] public static extern void FatalExit(int code);
1240         [DllImport("kernel32")] public static extern void FreeLibraryAndExitThread(HANDLE hLibModule, int dwExitCode);
1241         [DllImport("kernel32")] public static extern void GetLocalTime(ref SYSTEMTIME lpSystemTime);
1242         [DllImport("kernel32")] public static extern void GetStartupInfo(ref STARTUPINFO lpStartupInfo);
1243         [DllImport("kernel32")] public static extern void GetSystemInfo(ref SYSTEM_INFO lpSystemInfo);
1244         [DllImport("kernel32")] public static extern void GetSystemTime(ref SYSTEMTIME lpSystemTime);
1245         [DllImport("kernel32")] public static extern void GlobalFix(HANDLE hMem);
1246         [DllImport("kernel32")] public static extern void GlobalMemoryStatus(ref MEMORYSTATUS lpBuffer);
1247         [DllImport("kernel32")] public static extern void GlobalUnfix(HANDLE hMem);
1248         [DllImport("kernel32")] public static extern void InitializeCriticalSection(ref CRITICAL_SECTION lpCriticalSection);
1249         [DllImport("kernel32")] public static extern void LeaveCriticalSection(ref CRITICAL_SECTION lpCriticalSection);
1250         [DllImport("kernel32")] public static extern void RaiseException(int dwExceptionCode, int dwExceptionFlags, int nNumberOfArguments, ref int lpArguments);
1251         [DllImport("kernel32")] public static extern void SetFileApisToANSI();
1252         [DllImport("kernel32")] public static extern void SetFileApisToOEM();
1253         [DllImport("kernel32")] public static extern void SetLastError(int dwErrCode);
1254         [DllImport("kernel32")] public static extern void Sleep(int dwMilliseconds);
1255         [DllImport("kernel32")] public static extern int GetComputerNameW(IntPtr lpBuffer, int nSize);
1256         [DllImport("kernel32")] public static extern int GetProcAddress(HANDLE hModule, string lpProcName);
1257 
1258         public const int ACCESS_ALLOWED_ACE_TYPE = 0x0;
1259         public const int ACCESS_DENIED_ACE_TYPE = 0x1;
1260         public const int ACCESS_SYSTEM_SECURITY = 0x1000000;
1261         public const int ACL_REVISION = (2);
1262         public const int ACL_REVISION1 = (1);
1263         public const int ACL_REVISION2 = (2);
1264         public const int AC_LINE_BACKUP_POWER = 0x2;
1265         public const int AC_LINE_OFFLINE = 0x0;
1266         public const int AC_LINE_ONLINE = 0x1;
1267         public const int AC_LINE_UNKNOWN = 0xFF;
1268         public const int APPLICATION_ERROR_MASK = 0x20000000;
1269         public const int AclRevisionInformation = 1;
1270         public const int AclSizeInformation = 2;
1271         public const int BACKGROUND_BLUE = 0x10; 
1272         public const int BACKGROUND_GREEN = 0x20; 
1273         public const int BACKGROUND_INTENSITY = 0x80; 
1274         public const int BACKGROUND_RED = 0x40; 
1275         public const int BACKUP_ALTERNATE_DATA = 0x4;
1276         public const int BACKUP_DATA = 0x1;
1277         public const int BACKUP_EA_DATA = 0x2;
1278         public const int BACKUP_LINK = 0x5;
1279         public const int BACKUP_SECURITY_DATA = 0x3;
1280         public const int BATTERY_FLAG_CHARGING = 0x8;
1281         public const int BATTERY_FLAG_CRITICAL = 0x4;
1282         public const int BATTERY_FLAG_HIGH = 0x1;
1283         public const int BATTERY_FLAG_LOW = 0x2;
1284         public const int BATTERY_FLAG_NO_BATTERY = 0x80;
1285         public const int BATTERY_FLAG_UNKNOWN = 0xFF;
1286         public const int BATTERY_LIFE_UNKNOWN = 0xFFFF;
1287         public const int BATTERY_PERCENTAGE_UNKNOWN = 0xFF;
1288         public const int BAUD_075 = 0x1;
1289         public const int BAUD_110 = 0x2;
1290         public const int BAUD_115200 = 0x20000;
1291         public const int BAUD_1200 = 0x40;
1292         public const int BAUD_128K = 0x10000;
1293         public const int BAUD_134_5 = 0x4;
1294         public const int BAUD_14400 = 0x1000;
1295         public const int BAUD_150 = 0x8;
1296         public const int BAUD_1800 = 0x80;
1297         public const int BAUD_19200 = 0x2000;
1298         public const int BAUD_2400 = 0x100;
1299         public const int BAUD_300 = 0x10;
1300         public const int BAUD_38400 = 0x4000;
1301         public const int BAUD_4800 = 0x200;
1302         public const int BAUD_56K = 0x8000;
1303         public const int BAUD_57600 = 0x40000;
1304         public const int BAUD_600 = 0x20;
1305         public const int BAUD_7200 = 0x400;
1306         public const int BAUD_9600 = 0x800;
1307         public const int BAUD_USER = 0x10000000;
1308         public const int C1_ALPHA = 0x100; 
1309         public const int C1_BLANK = 0x40; 
1310         public const int C1_CNTRL = 0x20; 
1311         public const int C1_DIGIT = 0x4; 
1312         public const int C1_LOWER = 0x2; 
1313         public const int C1_PUNCT = 0x10; 
1314         public const int C1_SPACE = 0x8; 
1315         public const int C1_UPPER = 0x1; 
1316         public const int C1_XDIGIT = 0x80; 
1317         public const int C2_ARABICNUMBER = 0x6; 
1318         public const int C2_BLOCKSEPARATOR = 0x8; 
1319         public const int C2_COMMONSEPARATOR = 0x7; 
1320         public const int C2_EUROPENUMBER = 0x3; 
1321         public const int C2_EUROPESEPARATOR = 0x4; 
1322         public const int C2_EUROPETERMINATOR = 0x5; 
1323         public const int C2_LEFTTORIGHT = 0x1; 
1324         public const int C2_NOTAPPLICABLE = 0x0; 
1325         public const int C2_OTHERNEUTRAL = 0xB; 
1326         public const int C2_RIGHTTOLEFT = 0x2; 
1327         public const int C2_SEGMENTSEPARATOR = 0x9; 
1328         public const int C2_WHITESPACE = 0xA; 
1329         public const int C3_DIACRITIC = 0x2; 
1330         public const int C3_NONSPACING = 0x1; 
1331         public const int C3_NOTAPPLICABLE = 0x0; 
1332         public const int C3_SYMBOL = 0x8; 
1333         public const int C3_VOWELMARK = 0x4; 
1334         public const int CAL_GREGORIAN = 1; 
1335         public const int CAL_GREGORIAN_US = 2; 
1336         public const int CAL_ICALINTVALUE = 0x1; 
1337         public const int CAL_IYEAROFFSETRANGE = 0x3; 
1338         public const int CAL_JAPAN = 3; 
1339         public const int CAL_KOREA = 5; 
1340         public const int CAL_SABBREVDAYNAME1 = 0xE; 
1341         public const int CAL_SABBREVDAYNAME2 = 0xF; 
1342         public const int CAL_SABBREVDAYNAME3 = 0x10; 
1343         public const int CAL_SABBREVDAYNAME4 = 0x11; 
1344         public const int CAL_SABBREVDAYNAME5 = 0x12; 
1345         public const int CAL_SABBREVDAYNAME6 = 0x13; 
1346         public const int CAL_SABBREVDAYNAME7 = 0x14; 
1347         public const int CAL_SABBREVMONTHNAME1 = 0x22; 
1348         public const int CAL_SABBREVMONTHNAME10 = 0x2B; 
1349         public const int CAL_SABBREVMONTHNAME11 = 0x2C; 
1350         public const int CAL_SABBREVMONTHNAME12 = 0x2D; 
1351         public const int CAL_SABBREVMONTHNAME13 = 0x2E; 
1352         public const int CAL_SABBREVMONTHNAME2 = 0x23; 
1353         public const int CAL_SABBREVMONTHNAME3 = 0x24; 
1354         public const int CAL_SABBREVMONTHNAME4 = 0x25; 
1355         public const int CAL_SABBREVMONTHNAME5 = 0x26; 
1356         public const int CAL_SABBREVMONTHNAME6 = 0x27; 
1357         public const int CAL_SABBREVMONTHNAME7 = 0x28; 
1358         public const int CAL_SABBREVMONTHNAME8 = 0x29; 
1359         public const int CAL_SABBREVMONTHNAME9 = 0x2A; 
1360         public const int CAL_SCALNAME = 0x2; 
1361         public const int CAL_SDAYNAME1 = 0x7; 
1362         public const int CAL_SDAYNAME2 = 0x8; 
1363         public const int CAL_SDAYNAME3 = 0x9; 
1364         public const int CAL_SDAYNAME4 = 0xA; 
1365         public const int CAL_SDAYNAME5 = 0xB; 
1366         public const int CAL_SDAYNAME6 = 0xC; 
1367         public const int CAL_SDAYNAME7 = 0xD; 
1368         public const int CAL_SERASTRING = 0x4; 
1369         public const int CAL_SLONGDATE = 0x6; 
1370         public const int CAL_SMONTHNAME1 = 0x15; 
1371         public const int CAL_SMONTHNAME10 = 0x1E; 
1372         public const int CAL_SMONTHNAME11 = 0x1F; 
1373         public const int CAL_SMONTHNAME12 = 0x20; 
1374         public const int CAL_SMONTHNAME13 = 0x21; 
1375         public const int CAL_SMONTHNAME2 = 0x16; 
1376         public const int CAL_SMONTHNAME3 = 0x17; 
1377         public const int CAL_SMONTHNAME4 = 0x18; 
1378         public const int CAL_SMONTHNAME5 = 0x19; 
1379         public const int CAL_SMONTHNAME6 = 0x1A; 
1380         public const int CAL_SMONTHNAME7 = 0x1B; 
1381         public const int CAL_SMONTHNAME8 = 0x1C; 
1382         public const int CAL_SMONTHNAME9 = 0x1D; 
1383         public const int CAL_SSHORTDATE = 0x5; 
1384         public const int CAL_TAIWAN = 4; 
1385         public const int CAPSLOCK_ON = 0x80; 
1386         public const int CBR_110 = 110;
1387         public const int CBR_115200 = 115200;
1388         public const int CBR_1200 = 1200;
1389         public const int CBR_128000 = 128000;
1390         public const int CBR_14400 = 14400;
1391         public const int CBR_19200 = 19200;
1392         public const int CBR_2400 = 2400;
1393         public const int CBR_256000 = 256000;
1394         public const int CBR_300 = 300;
1395         public const int CBR_38400 = 38400;
1396         public const int CBR_4800 = 4800;
1397         public const int CBR_56000 = 56000;
1398         public const int CBR_57600 = 57600;
1399         public const int CBR_600 = 600;
1400         public const int CBR_9600 = 9600;
1401         public const int CE_BREAK = 0x10; 
1402         public const int CE_DNS = 0x800; 
1403         public const int CE_FRAME = 0x8; 
1404         public const int CE_IOE = 0x400; 
1405         public const int CE_MODE = 0x8000; 
1406         public const int CE_OOP = 0x1000; 
1407         public const int CE_OVERRUN = 0x2; 
1408         public const int CE_PTO = 0x200; 
1409         public const int CE_RXOVER = 0x1; 
1410         public const int CE_RXPARITY = 0x4; 
1411         public const int CE_TXFULL = 0x100; 
1412         public const int CLRBREAK = 9; 
1413         public const int CLRDTR = 6; 
1414         public const int CLRRTS = 4; 
1415         public const int CONSOLE_TEXTMODE_BUFFER = 1;
1416         public const int CONTAINER_INHERIT_ACE = 0x2;
1417         public const int CP_ACP = 0; 
1418         public const int CP_OEMCP = 1; 
1419         public const int CREATE_ALWAYS = 2;
1420         public const int CREATE_NEW = 1;
1421         public const int CREATE_NEW_CONSOLE = 0x10;
1422         public const int CREATE_NEW_PROCESS_GROUP = 0x200;
1423         public const int CREATE_NO_WINDOW = 0x8000000;
1424         public const int CREATE_PROCESS_DEBUG_EVENT = 3;
1425         public const int CREATE_SUSPENDED = 0x4;
1426         public const int CREATE_THREAD_DEBUG_EVENT = 2;
1427         public const int CTRL_BREAK_EVENT = 1;
1428         public const int CTRL_CLOSE_EVENT = 2;
1429         public const int CTRL_C_EVENT = 0;
1430         public const int CTRL_LOGOFF_EVENT = 5;
1431         public const int CTRL_SHUTDOWN_EVENT = 6;
1432         public const int CTRY_AUSTRALIA = 61; 
1433         public const int CTRY_AUSTRIA = 43; 
1434         public const int CTRY_BELGIUM = 32; 
1435         public const int CTRY_BRAZIL = 55; 
1436         public const int CTRY_CANADA = 2; 
1437         public const int CTRY_DEFAULT = 0;
1438         public const int CTRY_DENMARK = 45; 
1439         public const int CTRY_FINLAND = 358; 
1440         public const int CTRY_FRANCE = 33; 
1441         public const int CTRY_GERMANY = 49; 
1442         public const int CTRY_ICELAND = 354; 
1443         public const int CTRY_IRELAND = 353; 
1444         public const int CTRY_ITALY = 39; 
1445         public const int CTRY_JAPAN = 81; 
1446         public const int CTRY_MEXICO = 52; 
1447         public const int CTRY_NETHERLANDS = 31; 
1448         public const int CTRY_NEW_ZEALAND = 64; 
1449         public const int CTRY_NORWAY = 47; 
1450         public const int CTRY_PORTUGAL = 351; 
1451         public const int CTRY_PRCHINA = 86; 
1452         public const int CTRY_SOUTH_KOREA = 82; 
1453         public const int CTRY_SPAIN = 34; 
1454         public const int CTRY_SWEDEN = 46; 
1455         public const int CTRY_SWITZERLAND = 41; 
1456         public const int CTRY_TAIWAN = 886; 
1457         public const int CTRY_UNITED_KINGDOM = 44; 
1458         public const int CTRY_UNITED_STATES = 1; 
1459         public const int CT_CTYPE1 = 0x1; 
1460         public const int CT_CTYPE2 = 0x2; 
1461         public const int CT_CTYPE3 = 0x4; 
1462         public const int DATABITS_16 = 0x10;
1463         public const int DATABITS_16X = 0x20;
1464         public const int DATABITS_5 = 0x1;
1465         public const int DATABITS_6 = 0x2;
1466         public const int DATABITS_7 = 0x4;
1467         public const int DATABITS_8 = 0x8;
1468         public const int DATE_LONGDATE = 0x2; 
1469         public const int DATE_SHORTDATE = 0x1; 
1470         public const int DDD_EXACT_MATCH_ON_REMOVE = 0x4;
1471         public const int DDD_RAW_TARGET_PATH = 0x1;
1472         public const int DDD_REMOVE_DEFINITION = 0x2;
1473         public const int DEBUG_ONLY_THIS_PROCESS = 0x2;
1474         public const int DEBUG_PROCESS = 0x1;
1475         public const int DELETE = 0x10000;
1476         public const int DETACHED_PROCESS = 0x8;
1477         public const int DFCS_ADJUSTRECT = 0x2000;
1478         public const int DFCS_BUTTON3STATE = 0x8;
1479         public const int DFCS_BUTTONCHECK = 0x0;
1480         public const int DFCS_BUTTONPUSH = 0x10;
1481         public const int DFCS_BUTTONRADIO = 0x4;
1482         public const int DFCS_BUTTONRADIOIMAGE = 0x1;
1483         public const int DFCS_BUTTONRADIOMASK = 0x2;
1484         public const int DFCS_CAPTIONCLOSE = 0x0;
1485         public const int DFCS_CAPTIONHELP = 0x4;
1486         public const int DFCS_CAPTIONMAX = 0x2;
1487         public const int DFCS_CAPTIONMIN = 0x1;
1488         public const int DFCS_CAPTIONRESTORE = 0x3;
1489         public const int DFCS_CHECKED = 0x400;
1490         public const int DFCS_FLAT = 0x4000;
1491         public const int DFCS_INACTIVE = 0x100;
1492         public const int DFCS_MENUARROW = 0x0;
1493         public const int DFCS_MENUARROWRIGHT = 0x4;
1494         public const int DFCS_MENUBULLET = 0x2;
1495         public const int DFCS_MENUCHECK = 0x1;
1496         public const int DFCS_MONO = 0x8000;
1497         public const int DFCS_PUSHED = 0x200;
1498         public const int DFCS_SCROLLCOMBOBOX = 0x5;
1499         public const int DFCS_SCROLLDOWN = 0x1;
1500         public const int DFCS_SCROLLLEFT = 0x2;
1501         public const int DFCS_SCROLLRIGHT = 0x3;
1502         public const int DFCS_SCROLLSIZEGRIP = 0x8;
1503         public const int DFCS_SCROLLSIZEGRIPRIGHT = 0x10;
1504         public const int DFCS_SCROLLUP = 0x0;
1505         public const int DFC_BUTTON = 4;
1506         public const int DFC_CAPTION = 1;
1507         public const int DFC_MENU = 2;
1508         public const int DFC_SCROLL = 3;
1509         public const int DOMAIN_ALIAS_RID_ACCOUNT_OPS = 0x224;
1510         public const int DOMAIN_ALIAS_RID_ADMINS = 0x220;
1511         public const int DOMAIN_ALIAS_RID_BACKUP_OPS = 0x227;
1512         public const int DOMAIN_ALIAS_RID_GUESTS = 0x222;
1513         public const int DOMAIN_ALIAS_RID_POWER_USERS = 0x223;
1514         public const int DOMAIN_ALIAS_RID_PRINT_OPS = 0x226;
1515         public const int DOMAIN_ALIAS_RID_REPLICATOR = 0x228;
1516         public const int DOMAIN_ALIAS_RID_SYSTEM_OPS = 0x225;
1517         public const int DOMAIN_ALIAS_RID_USERS = 0x221;
1518         public const int DOMAIN_GROUP_RID_ADMINS = 0x200;
1519         public const int DOMAIN_GROUP_RID_GUESTS = 0x202;
1520         public const int DOMAIN_GROUP_RID_USERS = 0x201;
1521         public const int DOMAIN_USER_RID_ADMIN = 0x1F4;
1522         public const int DOMAIN_USER_RID_GUEST = 0x1F5;
1523         public const int DONT_RESOLVE_DLL_REFERENCES = 0x1;
1524         public const int DOUBLE_CLICK = 0x2;
1525         public const int DRIVE_CDROM = 5;
1526         public const int DRIVE_FIXED = 3;
1527         public const int DRIVE_RAMDISK = 6;
1528         public const int DRIVE_REMOTE = 4;
1529         public const int DRIVE_REMOVABLE = 2;
1530         public const int DTR_CONTROL_DISABLE = 0x0;
1531         public const int DTR_CONTROL_ENABLE = 0x1;
1532         public const int DTR_CONTROL_HANDSHAKE = 0x2;
1533         public const int DUPLICATE_CLOSE_SOURCE = 0x1;
1534         public const int DUPLICATE_SAME_ACCESS = 0x2;
1535         public const int ENABLE_ECHO_INPUT = 0x4;
1536         public const int ENABLE_LINE_INPUT = 0x2;
1537         public const int ENABLE_MOUSE_INPUT = 0x10;
1538         public const int ENABLE_PROCESSED_INPUT = 0x1;
1539         public const int ENABLE_PROCESSED_OUTPUT = 0x1;
1540         public const int ENABLE_WINDOW_INPUT = 0x8;
1541         public const int ENABLE_WRAP_AT_EOL_OUTPUT = 0x2;
1542         public const int ENHANCED_KEY = 0x100; 
1543         public const int ENUM_ALL_CALENDARS = 0xFFFF; 
1544         public const int ERROR_SEVERITY_ERROR = unchecked((int)0xC0000000);
1545         public const int ERROR_SEVERITY_INFORMATIONAL = 0x40000000;
1546         public const int ERROR_SEVERITY_SUCCESS = 0x0;
1547         public const int ERROR_SEVERITY_WARNING = unchecked((int)0x80000000);
1548         public const int EVENPARITY = 2;
1549         public const int EV_BREAK = 0x40; 
1550         public const int EV_CTS = 0x8; 
1551         public const int EV_DSR = 0x10; 
1552         public const int EV_ERR = 0x80; 
1553         public const int EV_EVENT1 = 0x800; 
1554         public const int EV_EVENT2 = 0x1000; 
1555         public const int EV_PERR = 0x200; 
1556         public const int EV_RING = 0x100; 
1557         public const int EV_RLSD = 0x20; 
1558         public const int EV_RX80FULL = 0x400; 
1559         public const int EV_RXCHAR = 0x1; 
1560         public const int EV_RXFLAG = 0x2; 
1561         public const int EV_TXEMPTY = 0x4; 
1562         public const int EXCEPTION_CONTINUE_EXECUTION = -1;
1563         public const int EXCEPTION_CONTINUE_SEARCH = 0;
1564         public const int EXCEPTION_DEBUG_EVENT = 1;
1565         public const int EXCEPTION_EXECUTE_HANDLER = 1;
1566         public const int EXCEPTION_MAXIMUM_PARAMETERS = 15;
1567         public const int EXIT_PROCESS_DEBUG_EVENT = 5;
1568         public const int EXIT_THREAD_DEBUG_EVENT = 4;
1569         public const int FAILED_ACCESS_ACE_FLAG = 0x80;
1570         public const int FILE_ADD_FILE = (0x2); 
1571         public const int FILE_ADD_SUBDIRECTORY = (0x4); 
1572         public const int FILE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF);
1573         public const int FILE_APPEND_DATA = (0x4); 
1574         public const int FILE_ATTRIBUTE_ARCHIVE = 0x20;
1575         public const int FILE_ATTRIBUTE_COMPRESSED = 0x800;
1576         public const int FILE_ATTRIBUTE_DIRECTORY = 0x10;
1577         public const int FILE_ATTRIBUTE_HIDDEN = 0x2;
1578         public const int FILE_ATTRIBUTE_NORMAL = 0x80;
1579         public const int FILE_ATTRIBUTE_READONLY = 0x1;
1580         public const int FILE_ATTRIBUTE_SYSTEM = 0x4;
1581         public const int FILE_ATTRIBUTE_TEMPORARY = 0x100;
1582         public const int FILE_BEGIN = 0;
1583         public const int FILE_CASE_PRESERVED_NAMES = 0x2;
1584         public const int FILE_CASE_SENSITIVE_SEARCH = 0x1;
1585         public const int FILE_CREATE_PIPE_INSTANCE = (0x4); 
1586         public const int FILE_CURRENT = 1;
1587         public const int FILE_DELETE_CHILD = (0x40); 
1588         public const int FILE_END = 2;
1589         public const int FILE_EXECUTE = (0x20); 
1590         public const int FILE_FILE_COMPRESSION = 0x10;
1591         public const int FILE_FLAG_BACKUP_SEMANTICS = 0x2000000;
1592         public const int FILE_FLAG_DELETE_ON_CLOSE = 0x4000000;
1593         public const int FILE_FLAG_NO_BUFFERING = 0x20000000;
1594         public const int FILE_FLAG_OVERLAPPED = 0x40000000;
1595         public const int FILE_FLAG_POSIX_SEMANTICS = 0x1000000;
1596         public const int FILE_FLAG_RANDOM_ACCESS = 0x10000000;
1597         public const int FILE_FLAG_SEQUENTIAL_SCAN = 0x8000000;
1598         public const int FILE_FLAG_WRITE_THROUGH = unchecked((int)0x80000000);
1599         public const int FILE_GENERIC_EXECUTE = (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE);
1600         public const int FILE_GENERIC_READ = (STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE);
1601         public const int FILE_GENERIC_WRITE = (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE);
1602         public const int FILE_LIST_DIRECTORY = (0x1); 
1603         public const int FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS;
1604         public const int FILE_MAP_COPY = SECTION_QUERY;
1605         public const int FILE_MAP_READ = SECTION_MAP_READ;
1606         public const int FILE_MAP_WRITE = SECTION_MAP_WRITE;
1607         public const int FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x4;
1608         public const int FILE_NOTIFY_CHANGE_DIR_NAME = 0x2;
1609         public const int FILE_NOTIFY_CHANGE_FILE_NAME = 0x1;
1610         public const int FILE_NOTIFY_CHANGE_LAST_WRITE = 0x10;
1611         public const int FILE_NOTIFY_CHANGE_SECURITY = 0x100;
1612         public const int FILE_NOTIFY_CHANGE_SIZE = 0x8;
1613         public const int FILE_PERSISTENT_ACLS = 0x8;
1614         public const int FILE_READ_ATTRIBUTES = (0x80); 
1615         public const int FILE_READ_DATA = (0x1); 
1616         public const int FILE_READ_EA = (0x8); 
1617         public const int FILE_READ_PROPERTIES = FILE_READ_EA;
1618         public const int FILE_SHARE_READ = 0x1;
1619         public const int FILE_SHARE_WRITE = 0x2;
1620         public const int FILE_TRAVERSE = (0x20); 
1621         public const int FILE_TYPE_CHAR = 0x2;
1622         public const int FILE_TYPE_DISK = 0x1;
1623         public const int FILE_TYPE_PIPE = 0x3;
1624         public const int FILE_TYPE_REMOTE = 0x8000;
1625         public const int FILE_TYPE_UNKNOWN = 0x0;
1626         public const int FILE_UNICODE_ON_DISK = 0x4;
1627         public const int FILE_VOLUME_IS_COMPRESSED = 0x8000;
1628         public const int FILE_WRITE_ATTRIBUTES = (0x100); 
1629         public const int FILE_WRITE_DATA = (0x2); 
1630         public const int FILE_WRITE_EA = (0x10); 
1631         public const int FILE_WRITE_PROPERTIES = FILE_WRITE_EA;
1632         public const int FOCUS_EVENT = 0x10; 
1633         public const int FOREGROUND_BLUE = 0x1; 
1634         public const int FOREGROUND_GREEN = 0x2; 
1635         public const int FOREGROUND_INTENSITY = 0x8; 
1636         public const int FOREGROUND_RED = 0x4; 
1637         public const int FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x100;
1638         public const int FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x2000;
1639         public const int FORMAT_MESSAGE_FROM_HMODULE = 0x800;
1640         public const int FORMAT_MESSAGE_FROM_STRING = 0x400;
1641         public const int FORMAT_MESSAGE_FROM_SYSTEM = 0x1000;
1642         public const int FORMAT_MESSAGE_IGNORE_INSERTS = 0x200;
1643         public const int FORMAT_MESSAGE_MAX_WIDTH_MASK = 0xFF;
1644         public const int FROM_LEFT_1ST_BUTTON_PRESSED = 0x1;
1645         public const int FROM_LEFT_2ND_BUTTON_PRESSED = 0x4;
1646         public const int FROM_LEFT_3RD_BUTTON_PRESSED = 0x8;
1647         public const int FROM_LEFT_4TH_BUTTON_PRESSED = 0x10;
1648         public const int FS_CASE_IS_PRESERVED = FILE_CASE_PRESERVED_NAMES;
1649         public const int FS_CASE_SENSITIVE = FILE_CASE_SENSITIVE_SEARCH;
1650         public const int FS_PERSISTENT_ACLS = FILE_PERSISTENT_ACLS;
1651         public const int FS_UNICODE_STORED_ON_DISK = FILE_UNICODE_ON_DISK;
1652         public const int GENERIC_ALL = 0x10000000;
1653         public const int GENERIC_EXECUTE = 0x20000000;
1654         public const int GENERIC_READ = unchecked((int)0x80000000);
1655         public const int GENERIC_WRITE = 0x40000000;
1656         public const int GET_TAPE_DRIVE_INFORMATION = 1;
1657         public const int GET_TAPE_MEDIA_INFORMATION = 0;
1658         public const int GHND = (GMEM_MOVEABLE | GMEM_ZEROINIT);
1659         public const int GMEM_DDESHARE = 0x2000;
1660         public const int GMEM_DISCARDABLE = 0x100;
1661         public const int GMEM_DISCARDED = 0x4000;
1662         public const int GMEM_FIXED = 0x0;
1663         public const int GMEM_INVALID_HANDLE = 0x8000;
1664         public const int GMEM_LOCKCOUNT = 0xFF;
1665         public const int GMEM_LOWER = GMEM_NOT_BANKED;
1666         public const int GMEM_MODIFY = 0x80;
1667         public const int GMEM_MOVEABLE = 0x2;
1668         public const int GMEM_NOCOMPACT = 0x10;
1669         public const int GMEM_NODISCARD = 0x20;
1670         public const int GMEM_NOTIFY = 0x4000;
1671         public const int GMEM_NOT_BANKED = 0x1000;
1672         public const int GMEM_SHARE = 0x2000;
1673         public const int GMEM_VALID_FLAGS = 0x7F72;
1674         public const int GMEM_ZEROINIT = 0x40;
1675         public const int GPTR = (GMEM_FIXED | GMEM_ZEROINIT);
1676         public const int HIGH_PRIORITY_CLASS = 0x80;
1677         public const int HKEY_CLASSES_ROOT = unchecked((int)0x80000000);
1678         public const int HKEY_CURRENT_CONFIG = unchecked((int)0x80000005);
1679         public const int HKEY_CURRENT_USER = unchecked((int)0x80000001);
1680         public const int HKEY_DYN_DATA = unchecked((int)0x80000006);
1681         public const int HKEY_LOCAL_MACHINE = unchecked((int)0x80000002);
1682         public const int HKEY_PERFORMANCE_DATA = unchecked((int)0x80000004);
1683         public const int HKEY_USERS = unchecked((int)0x80000003);
1684         public const int IDLE_PRIORITY_CLASS = 0x40;
1685         public const int IE_BADID = (-1); 
1686         public const int IE_BAUDRATE = (-12); 
1687         public const int IE_BYTESIZE = (-11); 
1688         public const int IE_DEFAULT = (-5); 
1689         public const int IE_HARDWARE = (-10); 
1690         public const int IE_MEMORY = (-4); 
1691         public const int IE_NOPEN = (-3); 
1692         public const int IE_OPEN = (-2); 
1693         public const int IGNORE = 0; 
1694         public const int INFINITE = 0xFFFF; 
1695         public const int INHERIT_ONLY_ACE = 0x8;
1696         public const int IO_COMPLETION_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3);
1697         public const int IO_COMPLETION_MODIFY_STATE = 0x2;
1698         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));
1699         public const int KEY_CREATE_LINK = 0x20;
1700         public const int KEY_CREATE_SUB_KEY = 0x4;
1701         public const int KEY_ENUMERATE_SUB_KEYS = 0x8;
1702         public const int KEY_EVENT = 0x1; 
1703         public const int KEY_EXECUTE = ((KEY_READ) & (~ SYNCHRONIZE));
1704         public const int KEY_NOTIFY = 0x10;
1705         public const int KEY_QUERY_VALUE = 0x1;
1706         public const int KEY_READ = ((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & (~ SYNCHRONIZE));
1707         public const int KEY_SET_VALUE = 0x2;
1708         public const int KEY_WRITE = ((STANDARD_RIGHTS_WRITE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY) & (~ SYNCHRONIZE));
1709         public const int LANG_BULGARIAN = 0x2;
1710         public const int LANG_CHINESE = 0x4;
1711         public const int LANG_CROATIAN = 0x1A;
1712         public const int LANG_CZECH = 0x5;
1713         public const int LANG_DANISH = 0x6;
1714         public const int LANG_DUTCH = 0x13;
1715         public const int LANG_ENGLISH = 0x9;
1716         public const int LANG_FINNISH = 0xB;
1717         public const int LANG_FRENCH = 0xC;
1718         public const int LANG_GERMAN = 0x7;
1719         public const int LANG_GREEK = 0x8;
1720         public const int LANG_HUNGARIAN = 0xE;
1721         public const int LANG_ICELANDIC = 0xF;
1722         public const int LANG_ITALIAN = 0x10;
1723         public const int LANG_JAPANESE = 0x11;
1724         public const int LANG_KOREAN = 0x12;
1725         public const int LANG_NEUTRAL = 0x0;
1726         public const int LANG_NORWEGIAN = 0x14;
1727         public const int LANG_POLISH = 0x15;
1728         public const int LANG_PORTUGUESE = 0x16;
1729         public const int LANG_ROMANIAN = 0x18;
1730         public const int LANG_RUSSIAN = 0x19;
1731         public const int LANG_SLOVAK = 0x1B;
1732         public const int LANG_SLOVENIAN = 0x24;
1733         public const int LANG_SPANISH = 0xA;
1734         public const int LANG_SWEDISH = 0x1D;
1735         public const int LANG_TURKISH = 0x1F;
1736         public const int LCMAP_BYTEREV = 0x800; 
1737         public const int LCMAP_LOWERCASE = 0x100; 
1738         public const int LCMAP_SORTKEY = 0x400; 
1739         public const int LCMAP_UPPERCASE = 0x200; 
1740         public const int LEFT_ALT_PRESSED = 0x2; 
1741         public const int LEFT_CTRL_PRESSED = 0x8; 
1742         public const int LHND = (LMEM_MOVEABLE + LMEM_ZEROINIT);
1743         public const int LMEM_DISCARDABLE = 0xF00;
1744         public const int LMEM_DISCARDED = 0x4000;
1745         public const int LMEM_FIXED = 0x0;
1746         public const int LMEM_INVALID_HANDLE = 0x8000;
1747         public const int LMEM_LOCKCOUNT = 0xFF;
1748         public const int LMEM_MODIFY = 0x80;
1749         public const int LMEM_MOVEABLE = 0x2;
1750         public const int LMEM_NOCOMPACT = 0x10;
1751         public const int LMEM_NODISCARD = 0x20;
1752         public const int LMEM_VALID_FLAGS = 0xF72;
1753         public const int LMEM_ZEROINIT = 0x40;
1754         public const int LNOTIFY_DISCARD = 2;
1755         public const int LNOTIFY_MOVE = 1;
1756         public const int LNOTIFY_OUTOFMEM = 0;
1757         public const int LOAD_DLL_DEBUG_EVENT = 6;
1758         public const int LOCALE_ICENTURY = 0x24; 
1759         public const int LOCALE_ICOUNTRY = 0x5; 
1760         public const int LOCALE_ICURRDIGITS = 0x19; 
1761         public const int LOCALE_ICURRENCY = 0x1B; 
1762         public const int LOCALE_IDATE = 0x21; 
1763         public const int LOCALE_IDAYLZERO = 0x26; 
1764         public const int LOCALE_IDEFAULTCODEPAGE = 0xB; 
1765         public const int LOCALE_IDEFAULTCOUNTRY = 0xA; 
1766         public const int LOCALE_IDEFAULTLANGUAGE = 0x9; 
1767         public const int LOCALE_IDIGITS = 0x11; 
1768         public const int LOCALE_IINTLCURRDIGITS = 0x1A; 
1769         public const int LOCALE_ILANGUAGE = 0x1; 
1770         public const int LOCALE_ILDATE = 0x22; 
1771         public const int LOCALE_ILZERO = 0x12; 
1772         public const int LOCALE_IMEASURE = 0xD; 
1773         public const int LOCALE_IMONLZERO = 0x27; 
1774         public const int LOCALE_INEGCURR = 0x1C; 
1775         public const int LOCALE_INEGSEPBYSPACE = 0x57; 
1776         public const int LOCALE_INEGSIGNPOSN = 0x53; 
1777         public const int LOCALE_INEGSYMPRECEDES = 0x56; 
1778         public const int LOCALE_IPOSSEPBYSPACE = 0x55; 
1779         public const int LOCALE_IPOSSIGNPOSN = 0x52; 
1780         public const int LOCALE_IPOSSYMPRECEDES = 0x54; 
1781         public const int LOCALE_ITIME = 0x23; 
1782         public const int LOCALE_ITLZERO = 0x25; 
1783         public const int LOCALE_NOUSEROVERRIDE = unchecked((int) 0x80000000); 
1784         public const int LOCALE_S1159 = 0x28; 
1785         public const int LOCALE_S2359 = 0x29; 
1786         public const int LOCALE_SABBREVCTRYNAME = 0x7; 
1787         public const int LOCALE_SABBREVDAYNAME1 = 0x31; 
1788         public const int LOCALE_SABBREVDAYNAME2 = 0x32; 
1789         public const int LOCALE_SABBREVDAYNAME3 = 0x33; 
1790         public const int LOCALE_SABBREVDAYNAME4 = 0x34; 
1791         public const int LOCALE_SABBREVDAYNAME5 = 0x35; 
1792         public const int LOCALE_SABBREVDAYNAME6 = 0x36; 
1793         public const int LOCALE_SABBREVDAYNAME7 = 0x37; 
1794         public const int LOCALE_SABBREVLANGNAME = 0x3; 
1795         public const int LOCALE_SABBREVMONTHNAME1 = 0x44; 
1796         public const int LOCALE_SABBREVMONTHNAME10 = 0x4D; 
1797         public const int LOCALE_SABBREVMONTHNAME11 = 0x4E; 
1798         public const int LOCALE_SABBREVMONTHNAME12 = 0x4F; 
1799         public const int LOCALE_SABBREVMONTHNAME13 = 0x100F;
1800         public const int LOCALE_SABBREVMONTHNAME2 = 0x45; 
1801         public const int LOCALE_SABBREVMONTHNAME3 = 0x46; 
1802         public const int LOCALE_SABBREVMONTHNAME4 = 0x47; 
1803         public const int LOCALE_SABBREVMONTHNAME5 = 0x48; 
1804         public const int LOCALE_SABBREVMONTHNAME6 = 0x49; 
1805         public const int LOCALE_SABBREVMONTHNAME7 = 0x4A; 
1806         public const int LOCALE_SABBREVMONTHNAME8 = 0x4B; 
1807         public const int LOCALE_SABBREVMONTHNAME9 = 0x4C; 
1808         public const int LOCALE_SCOUNTRY = 0x6; 
1809         public const int LOCALE_SCURRENCY = 0x14; 
1810         public const int LOCALE_SDATE = 0x1D; 
1811         public const int LOCALE_SDAYNAME1 = 0x2A; 
1812         public const int LOCALE_SDAYNAME2 = 0x2B; 
1813         public const int LOCALE_SDAYNAME3 = 0x2C; 
1814         public const int LOCALE_SDAYNAME4 = 0x2D; 
1815         public const int LOCALE_SDAYNAME5 = 0x2E; 
1816         public const int LOCALE_SDAYNAME6 = 0x2F; 
1817         public const int LOCALE_SDAYNAME7 = 0x30; 
1818         public const int LOCALE_SDECIMAL = 0xE; 
1819         public const int LOCALE_SENGCOUNTRY = 0x1002; 
1820         public const int LOCALE_SENGLANGUAGE = 0x1001; 
1821         public const int LOCALE_SGROUPING = 0x10; 
1822         public const int LOCALE_SINTLSYMBOL = 0x15; 
1823         public const int LOCALE_SLANGUAGE = 0x2; 
1824         public const int LOCALE_SLIST = 0xC; 
1825         public const int LOCALE_SLONGDATE = 0x20; 
1826         public const int LOCALE_SMONDECIMALSEP = 0x16; 
1827         public const int LOCALE_SMONGROUPING = 0x18; 
1828         public const int LOCALE_SMONTHNAME1 = 0x38; 
1829         public const int LOCALE_SMONTHNAME10 = 0x41; 
1830         public const int LOCALE_SMONTHNAME11 = 0x42; 
1831         public const int LOCALE_SMONTHNAME12 = 0x43; 
1832         public const int LOCALE_SMONTHNAME2 = 0x39; 
1833         public const int LOCALE_SMONTHNAME3 = 0x3A; 
1834         public const int LOCALE_SMONTHNAME4 = 0x3B; 
1835         public const int LOCALE_SMONTHNAME5 = 0x3C; 
1836         public const int LOCALE_SMONTHNAME6 = 0x3D; 
1837         public const int LOCALE_SMONTHNAME7 = 0x3E; 
1838         public const int LOCALE_SMONTHNAME8 = 0x3F; 
1839         public const int LOCALE_SMONTHNAME9 = 0x40; 
1840         public const int LOCALE_SMONTHOUSANDSEP = 0x17; 
1841         public const int LOCALE_SNATIVECTRYNAME = 0x8; 
1842         public const int LOCALE_SNATIVEDIGITS = 0x13; 
1843         public const int LOCALE_SNATIVELANGNAME = 0x4; 
1844         public const int LOCALE_SNEGATIVESIGN = 0x51; 
1845         public const int LOCALE_SPOSITIVESIGN = 0x50; 
1846         public const int LOCALE_SSHORTDATE = 0x1F; 
1847         public const int LOCALE_STHOUSAND = 0xF; 
1848         public const int LOCALE_STIME = 0x1E; 
1849         public const int LOCALE_STIMEFORMAT = 0x1003; 
1850         public const int LOCKFILE_EXCLUSIVE_LOCK = 0x2;
1851         public const int LOCKFILE_FAIL_IMMEDIATELY = 0x1;
1852         public const int LOGON32_LOGON_BATCH = 4;
1853         public const int LOGON32_LOGON_INTERACTIVE = 2;
1854         public const int LOGON32_LOGON_SERVICE = 5;
1855         public const int LOGON32_PROVIDER_DEFAULT = 0;
1856         public const int LOGON32_PROVIDER_WINNT35 = 1;
1857         public const int LPTR = (LMEM_FIXED + LMEM_ZEROINIT);
1858         public const int LPTx = 0x80; 
1859         public const int MAILSLOT_NO_MESSAGE = (-1);
1860         public const int MAILSLOT_WAIT_FOREVER = (-1);
1861         public const int MAP_COMPOSITE = 0x40; 
1862         public const int MAP_FOLDCZONE = 0x10; 
1863         public const int MAP_FOLDDIGITS = 0x80; 
1864         public const int MAP_PRECOMPOSED = 0x20; 
1865         public const int MARKPARITY = 3;
1866         public const int MAXByte = 0xFF;
1867         public const int MAXCHAR = 0x7F;
1868         public const int MAXDWORD = unchecked((int)0xFFFFFFFF);
1869         public const int MAXIMUM_ALLOWED = 0x2000000;
1870         public const int MAXLONG = 0x7FFFFFFF;
1871         public const int MAXSHORT = 0x7FFF;
1872         public const int MAXWORD = 0xFFFF;
1873         public const int MAX_DEFAULTCHAR = 2;
1874         public const int MAX_LEADBYTES = 12; 
1875         public const int MAX_PATH = 260;
1876         public const int MB_COMPOSITE = 0x2; 
1877         public const int MB_PRECOMPOSED = 0x1; 
1878         public const int MB_USEGLYPHCHARS = 0x4; 
1879         public const int MENU_EVENT = 0x8; 
1880         public const int MINCHAR = 0x80;
1881         public const int MINLONG = unchecked((int)0x80000000);
1882         public const int MINSHORT = 0x8000;
1883         public const int MOUSE_MOVED = 0x1;
1884         public const int MOVEFILE_COPY_ALLOWED = 0x2;
1885         public const int MOVEFILE_DELAY_UNTIL_REBOOT = 0x4;
1886         public const int MOVEFILE_REPLACE_EXISTING = 0x1;
1887         public const int MS_CTS_ON = 0x10;
1888         public const int MS_DSR_ON = 0x20;
1889         public const int MS_RING_ON = 0x40;
1890         public const int MS_RLSD_ON = 0x80;
1891         public const int NMPWAIT_NOWAIT = 0x1;
1892         public const int NMPWAIT_USE_DEFAULT_WAIT = 0x0;
1893         public const int NMPWAIT_WAIT_FOREVER = 0xFFFF;
1894         public const int NONZEROLHND = (LMEM_MOVEABLE);
1895         public const int NONZEROLPTR = (LMEM_FIXED);
1896         public const int NOPARITY = 0;
1897         public const int NORMAL_PRIORITY_CLASS = 0x20;
1898         public const int NORM_IGNORECASE = 0x1; 
1899         public const int NORM_IGNORENONSPACE = 0x2; 
1900         public const int NORM_IGNORESYMBOLS = 0x4; 
1901         public const int NO_PROPAGATE_INHERIT_ACE = 0x4;
1902         public const int NUMLOCK_ON = 0x20; 
1903         public const int OBJECT_INHERIT_ACE = 0x1;
1904         public const int ODDPARITY = 1;
1905         public const int OFS_MAXPATHNAME = 128;
1906         public const int OF_CANCEL = 0x800;
1907         public const int OF_CREATE = 0x1000;
1908         public const int OF_DELETE = 0x200;
1909         public const int OF_EXIST = 0x4000;
1910         public const int OF_PARSE = 0x100;
1911         public const int OF_PROMPT = 0x2000;
1912         public const int OF_READ = 0x0;
1913         public const int OF_READWRITE = 0x2;
1914         public const int OF_REOPEN = 0x8000;
1915         public const int OF_SHARE_COMPAT = 0x0;
1916         public const int OF_SHARE_DENY_NONE = 0x40;
1917         public const int OF_SHARE_DENY_READ = 0x30;
1918         public const int OF_SHARE_DENY_WRITE = 0x20;
1919         public const int OF_SHARE_EXCLUSIVE = 0x10;
1920         public const int OF_VERIFY = 0x400;
1921         public const int OF_WRITE = 0x1;
1922         public const int ONE5STOPBITS = 1;
1923         public const int ONESTOPBIT = 0;
1924         public const int OPEN_ALWAYS = 4;
1925         public const int OPEN_EXISTING = 3;
1926         public const int OUTPUT_DEBUG_STRING_EVENT = 8;
1927         public const int PARITY_EVEN = 0x400;
1928         public const int PARITY_MARK = 0x800;
1929         public const int PARITY_NONE = 0x100;
1930         public const int PARITY_ODD = 0x200;
1931         public const int PARITY_SPACE = 0x1000;
1932         public const int PCF_16BITMODE = 0x200;
1933         public const int PCF_DTRDSR = 0x1;
1934         public const int PCF_INTTIMEOUTS = 0x80;
1935         public const int PCF_PARITY_CHECK = 0x8;
1936         public const int PCF_RLSD = 0x4;
1937         public const int PCF_RTSCTS = 0x2;
1938         public const int PCF_SETXCHAR = 0x20;
1939         public const int PCF_SPECIALCHARS = 0x100;
1940         public const int PCF_TOTALTIMEOUTS = 0x40;
1941         public const int PCF_XONXOFF = 0x10;
1942         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);
1943         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);
1944         public const int PERF_100NSEC_TIMER = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT);
1945         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);
1946         public const int PERF_AVERAGE_BASE = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x2); 
1947         public const int PERF_AVERAGE_BULK = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_NOSHOW);
1948         public const int PERF_AVERAGE_TIMER = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_SECONDS);
1949         public const int PERF_COUNTER_BASE = 0x30000; 
1950         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);
1951         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);
1952         public const int PERF_COUNTER_ELAPSED = 0x40000; 
1953         public const int PERF_COUNTER_FRACTION = 0x20000; 
1954         public const int PERF_COUNTER_HISTOGRAM = 0x60000; 
1955         public const int PERF_COUNTER_HISTOGRAM_TYPE = unchecked((int)0x80000000); 
1956         public const int PERF_COUNTER_MULTI_BASE = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_MULTI_COUNTER | PERF_DISPLAY_NOSHOW);
1957         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);
1958         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);
1959         public const int PERF_COUNTER_NODATA = (PERF_SIZE_ZERO | PERF_DISPLAY_NOSHOW);
1960         public const int PERF_COUNTER_QUEUELEN = 0x50000; 
1961         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);
1962         public const int PERF_COUNTER_RATE = 0x10000; 
1963         public const int PERF_COUNTER_RAWCOUNT = (PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL | PERF_DISPLAY_NO_SUFFIX);
1964         public const int PERF_COUNTER_TEXT = (PERF_SIZE_VARIABLE_LEN | PERF_TYPE_TEXT | PERF_TEXT_UNICODE | PERF_DISPLAY_NO_SUFFIX);
1965         public const int PERF_COUNTER_TIMER = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT);
1966         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);
1967         public const int PERF_COUNTER_VALUE = 0x0; 
1968         public const int PERF_DATA_REVISION = 1;
1969         public const int PERF_DATA_VERSION = 1;
1970         public const int PERF_DELTA_BASE = 0x800000; 
1971         public const int PERF_DELTA_COUNTER = 0x400000; 
1972         public const int PERF_DETAIL_ADVANCED = 200; 
1973         public const int PERF_DETAIL_EXPERT = 300; 
1974         public const int PERF_DETAIL_NOVICE = 100; 
1975         public const int PERF_DETAIL_WIZARD = 400; 
1976         public const int PERF_DISPLAY_NOSHOW = 0x40000000; 
1977         public const int PERF_DISPLAY_NO_SUFFIX = 0x0; 
1978         public const int PERF_DISPLAY_PERCENT = 0x20000000; 
1979         public const int PERF_DISPLAY_PER_SEC = 0x10000000; 
1980         public const int PERF_DISPLAY_SECONDS = 0x30000000; 
1981         public const int PERF_ELAPSED_TIME = (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_ELAPSED | PERF_OBJECT_TIMER | PERF_DISPLAY_SECONDS);
1982         public const int PERF_INVERSE_COUNTER = 0x1000000; 
1983         public const int PERF_MULTI_COUNTER = 0x2000000; 
1984         public const int PERF_NO_INSTANCES = -1; 
1985         public const int PERF_NO_UNIQUE_ID = -1;
1986         public const int PERF_NUMBER_DECIMAL = 0x10000; 
1987         public const int PERF_NUMBER_DEC_1000 = 0x20000; 
1988         public const int PERF_NUMBER_HEX = 0x0; 
1989         public const int PERF_OBJECT_TIMER = 0x200000; 
1990         public const int PERF_RAW_BASE = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x3); 
1991         public const int PERF_RAW_FRACTION = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DISPLAY_PERCENT);
1992         public const int PERF_SAMPLE_BASE = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE | PERF_DISPLAY_NOSHOW | 0x1); 
1993         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);
1994         public const int PERF_SAMPLE_FRACTION = (PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION | PERF_DELTA_COUNTER | PERF_DELTA_BASE | PERF_DISPLAY_PERCENT);
1995         public const int PERF_SIZE_DWORD = 0x0;
1996         public const int PERF_SIZE_LARGE = 0x100;
1997         public const int PERF_SIZE_VARIABLE_LEN = 0x300; 
1998         public const int PERF_SIZE_ZERO = 0x200; 
1999         public const int PERF_TEXT_ASCII = 0x10000; 
2000         public const int PERF_TEXT_UNICODE = 0x0; 
2001         public const int PERF_TIMER_100NS = 0x100000; 
2002         public const int PERF_TIMER_TICK = 0x0; 
2003         public const int PERF_TYPE_COUNTER = 0x400; 
2004         public const int PERF_TYPE_NUMBER = 0x0; 
2005         public const int PERF_TYPE_TEXT = 0x800; 
2006         public const int PERF_TYPE_ZERO = 0xC00; 
2007         public const int PIPE_ACCESS_DUPLEX = 0x3;
2008         public const int PIPE_ACCESS_INBOUND = 0x1;
2009         public const int PIPE_ACCESS_OUTBOUND = 0x2;
2010         public const int PIPE_CLIENT_END = 0x0;
2011         public const int PIPE_NOWAIT = 0x1;
2012         public const int PIPE_READMODE_BYTE = 0x0;
2013         public const int PIPE_READMODE_MESSAGE = 0x2;
2014         public const int PIPE_SERVER_END = 0x1;
2015         public const int PIPE_TYPE_BYTE = 0x0;
2016         public const int PIPE_TYPE_MESSAGE = 0x4;
2017         public const int PIPE_UNLIMITED_INSTANCES = 255;
2018         public const int PIPE_WAIT = 0x0;
2019         public const int PRIVILEGE_SET_ALL_NECESSARY = (1);
2020         public const int PROCESSOR_ALPHA_21064 = 21064;
2021         public const int PROCESSOR_ARCHITECTURE_ALPHA = 2;
2022         public const int PROCESSOR_ARCHITECTURE_INTEL = 0;
2023         public const int PROCESSOR_ARCHITECTURE_MIPS = 1;
2024         public const int PROCESSOR_ARCHITECTURE_PPC = 3;
2025         public const int PROCESSOR_ARCHITECTURE_UNKNOWN = 0xFFFF;
2026         public const int PROCESSOR_INTEL_386 = 386;
2027         public const int PROCESSOR_INTEL_486 = 486;
2028         public const int PROCESSOR_INTEL_PENTIUM = 586;
2029         public const int PROCESSOR_MIPS_R4000 = 4000;
2030         public const int PROCESS_HEAP_ENTRY_BUSY = 0x4;
2031         public const int PROCESS_HEAP_ENTRY_DDESHARE = 0x20;
2032         public const int PROCESS_HEAP_ENTRY_MOVEABLE = 0x10;
2033         public const int PROCESS_HEAP_REGION = 0x1;
2034         public const int PROCESS_HEAP_UNCOMMITTED_RANGE = 0x2;
2035         public const int PROFILE_KERNEL = 0x20000000;
2036         public const int PROFILE_SERVER = 0x40000000;
2037         public const int PROFILE_USER = 0x10000000;
2038         public const int PST_FAX = 0x21;
2039         public const int PST_LAT = 0x101;
2040         public const int PST_NETWORK_BRIDGE = 0x100;
2041         public const int PST_PARALLELPORT = 0x2;
2042         public const int PST_RS232 = 0x1;
2043         public const int PST_RS422 = 0x3;
2044         public const int PST_RS423 = 0x4;
2045         public const int PST_RS449 = 0x5;
2046         public const int PST_SCANNER = 0x22;
2047         public const int PST_TCPIP_TELNET = 0x102;
2048         public const int PST_UNSPECIFIED = 0x0;
2049         public const int PST_X25 = 0x103;
2050         public const int PURGE_RXABORT = 0x2; 
2051         public const int PURGE_RXCLEAR = 0x8; 
2052         public const int PURGE_TXABORT = 0x1; 
2053         public const int PURGE_TXCLEAR = 0x4; 
2054         public const int READ_CONTROL = 0x20000;
2055         public const int REALTIME_PRIORITY_CLASS = 0x100;
2056         public const int REG_BINARY = 3; 
2057         public const int REG_CREATED_NEW_KEY = 0x1; 
2058         public const int REG_DWORD = 4; 
2059         public const int REG_DWORD_BIG_ENDIAN = 5; 
2060         public const int REG_DWORD_LITTLE_ENDIAN = 4; 
2061         public const int REG_EXPAND_SZ = 2; 
2062         public const int REG_FULL_RESOURCE_DESCRIPTOR = 9; 
2063         public const int REG_LEGAL_CHANGE_FILTER = (REG_NOTIFY_CHANGE_NAME | REG_NOTIFY_CHANGE_ATTRIBUTES | REG_NOTIFY_CHANGE_LAST_SET | REG_NOTIFY_CHANGE_SECURITY);
2064         public const int REG_LEGAL_OPTION = (REG_OPTION_RESERVED | REG_OPTION_NON_VOLATILE | REG_OPTION_VOLATILE | REG_OPTION_CREATE_LINK | REG_OPTION_BACKUP_RESTORE);
2065         public const int REG_LINK = 6; 
2066         public const int REG_MULTI_SZ = 7; 
2067         public const int REG_NONE = 0; 
2068         public const int REG_NOTIFY_CHANGE_ATTRIBUTES = 0x2;
2069         public const int REG_NOTIFY_CHANGE_LAST_SET = 0x4; 
2070         public const int REG_NOTIFY_CHANGE_NAME = 0x1; 
2071         public const int REG_NOTIFY_CHANGE_SECURITY = 0x8;
2072         public const int REG_OPENED_EXISTING_KEY = 0x2; 
2073         public const int REG_OPTION_BACKUP_RESTORE = 4; 
2074         public const int REG_OPTION_CREATE_LINK = 2; 
2075         public const int REG_OPTION_NON_VOLATILE = 0; 
2076         public const int REG_OPTION_RESERVED = 0; 
2077         public const int REG_OPTION_VOLATILE = 1; 
2078         public const int REG_REFRESH_HIVE = 0x2; 
2079         public const int REG_RESOURCE_LIST = 8; 
2080         public const int REG_RESOURCE_REQUIREMENTS_LIST = 10;
2081         public const int REG_SZ = 1; 
2082         public const int REG_WHOLE_HIVE_VOLATILE = 0x1; 
2083         public const int RESETDEV = 7; 
2084         public const int RIGHTMOST_BUTTON_PRESSED = 0x2;
2085         public const int RIGHT_ALT_PRESSED = 0x1; 
2086         public const int RIGHT_CTRL_PRESSED = 0x4; 
2087         public const int RIP_EVENT = 9;
2088         public const int RTS_CONTROL_DISABLE = 0x0;
2089         public const int RTS_CONTROL_ENABLE = 0x1;
2090         public const int RTS_CONTROL_HANDSHAKE = 0x2;
2091         public const int RTS_CONTROL_TOGGLE = 0x3;
2092         public const int RT_ACCELERATOR = 9;
2093         public const int RT_BITMAP = 2;
2094         public const int RT_CURSOR = 1;
2095         public const int RT_DIALOG = 5;
2096         public const int RT_FONT = 8;
2097         public const int RT_FONTDIR = 7;
2098         public const int RT_ICON = 3;
2099         public const int RT_MENU = 4;
2100         public const int RT_RCDATA = 10;
2101         public const int RT_STRING = 6;
2102         public const int SCROLLLOCK_ON = 0x40; 
2103         public const int SCS_32BIT_BINARY = 0;
2104         public const int SCS_DOS_BINARY = 1;
2105         public const int SCS_OS216_BINARY = 5;
2106         public const int SCS_PIF_BINARY = 3;
2107         public const int SCS_POSIX_BINARY = 4;
2108         public const int SCS_WOW_BINARY = 2;
2109         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);
2110         public const int SC_MANAGER_CONNECT = 0x1;
2111         public const int SC_MANAGER_CREATE_SERVICE = 0x2;
2112         public const int SC_MANAGER_ENUMERATE_SERVICE = 0x4;
2113         public const int SC_MANAGER_LOCK = 0x8;
2114         public const int SC_MANAGER_MODIFY_BOOT_CONFIG = 0x20;
2115         public const int SC_MANAGER_QUERY_LOCK_STATUS = 0x10;
2116         public const int SECTION_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_WRITE | SECTION_MAP_READ | SECTION_MAP_EXECUTE | SECTION_EXTEND_SIZE;
2117         public const int SECTION_EXTEND_SIZE = 0x10;
2118         public const int SECTION_MAP_EXECUTE = 0x8;
2119         public const int SECTION_MAP_READ = 0x4;
2120         public const int SECTION_MAP_WRITE = 0x2;
2121         public const int SECTION_QUERY = 0x1;
2122         public const int SECURITY_ANONYMOUS_LOGON_RID = 0x7;
2123         public const int SECURITY_BATCH_RID = 0x3;
2124         public const int SECURITY_BUILTIN_DOMAIN_RID = 0x20;
2125         public const int SECURITY_CONTEXT_TRACKING = 0x40000;
2126         public const int SECURITY_CREATOR_GROUP_RID = 0x1;
2127         public const int SECURITY_CREATOR_OWNER_RID = 0x0;
2128         public const int SECURITY_DESCRIPTOR_MIN_LENGTH = (20);
2129         public const int SECURITY_DESCRIPTOR_REVISION = (1);
2130         public const int SECURITY_DESCRIPTOR_REVISION1 = (1);
2131         public const int SECURITY_DIALUP_RID = 0x1;
2132         public const int SECURITY_EFFECTIVE_ONLY = 0x80000;
2133         public const int SECURITY_INTERACTIVE_RID = 0x4;
2134         public const int SECURITY_LOCAL_RID = 0x0;
2135         public const int SECURITY_LOCAL_SYSTEM_RID = 0x12;
2136         public const int SECURITY_LOGON_IDS_RID = 0x5;
2137         public const int SECURITY_NETWORK_RID = 0x2;
2138         public const int SECURITY_NT_NON_UNIQUE = 0x15;
2139         public const int SECURITY_NULL_RID = 0x0;
2140         public const int SECURITY_SERVICE_RID = 0x6;
2141         public const int SECURITY_SQOS_PRESENT = 0x100000;
2142         public const int SECURITY_VALID_SQOS_FLAGS = 0x1F0000;
2143         public const int SECURITY_WORLD_RID = 0x0;
2144         public const int SEM_FAILCRITICALERRORS = 0x1;
2145         public const int SEM_NOGPFAULTERRORBOX = 0x2;
2146         public const int SEM_NOOPENFILEERRORBOX = 0x8000;
2147         public const int SERVICE_ACCEPT_PAUSE_CONTINUE = 0x2;
2148         public const int SERVICE_ACCEPT_SHUTDOWN = 0x4;
2149         public const int SERVICE_ACCEPT_STOP = 0x1;
2150         public const int SERVICE_ACTIVE = 0x1;
2151         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);
2152         public const int SERVICE_CHANGE_CONFIG = 0x2;
2153         public const int SERVICE_CONTINUE_PENDING = 0x5;
2154         public const int SERVICE_CONTROL_CONTINUE = 0x3;
2155         public const int SERVICE_CONTROL_INTERROGATE = 0x4;
2156         public const int SERVICE_CONTROL_PAUSE = 0x2;
2157         public const int SERVICE_CONTROL_SHUTDOWN = 0x5;
2158         public const int SERVICE_CONTROL_STOP = 0x1;
2159         public const int SERVICE_ENUMERATE_DEPENDENTS = 0x8;
2160         public const int SERVICE_INACTIVE = 0x2;
2161         public const int SERVICE_INTERROGATE = 0x80;
2162         public const int SERVICE_NO_CHANGE = 0xFFFF;
2163         public const int SERVICE_PAUSED = 0x7;
2164         public const int SERVICE_PAUSE_CONTINUE = 0x40;
2165         public const int SERVICE_PAUSE_PENDING = 0x6;
2166         public const int SERVICE_QUERY_CONFIG = 0x1;
2167         public const int SERVICE_QUERY_STATUS = 0x4;
2168         public const int SERVICE_RUNNING = 0x4;
2169         public const int SERVICE_START = 0x10;
2170         public const int SERVICE_START_PENDING = 0x2;
2171         public const int SERVICE_STATE_ALL = (SERVICE_ACTIVE | SERVICE_INACTIVE);
2172         public const int SERVICE_STOP = 0x20;
2173         public const int SERVICE_STOPPED = 0x1;
2174         public const int SERVICE_STOP_PENDING = 0x3;
2175         public const int SERVICE_USER_DEFINED_CONTROL = 0x100;
2176         public const int SETBREAK = 8; 
2177         public const int SETDTR = 5; 
2178         public const int SETRTS = 3; 
2179         public const int SETXOFF = 1; 
2180         public const int SETXON = 2; 
2181         public const int SET_TAPE_DRIVE_INFORMATION = 1;
2182         public const int SET_TAPE_MEDIA_INFORMATION = 0;
2183         public const int SE_DACL_DEFAULTED = 0x8;
2184         public const int SE_DACL_PRESENT = 0x4;
2185         public const int SE_GROUP_DEFAULTED = 0x2;
2186         public const int SE_GROUP_ENABLED = 0x4;
2187         public const int SE_GROUP_ENABLED_BY_DEFAULT = 0x2;
2188         public const int SE_GROUP_LOGON_ID = unchecked((int)0xC0000000);
2189         public const int SE_GROUP_MANDATORY = 0x1;
2190         public const int SE_GROUP_OWNER = 0x8;
2191         public const int SE_OWNER_DEFAULTED = 0x1;
2192         public const int SE_PRIVILEGE_ENABLED = 0x2;
2193         public const int SE_PRIVILEGE_ENABLED_BY_DEFAULT = 0x1;
2194         public const int SE_PRIVILEGE_USED_FOR_ACCESS = unchecked((int)0x80000000);
2195         public const int SE_SACL_DEFAULTED = 0x20;
2196         public const int SE_SACL_PRESENT = 0x10;
2197         public const int SE_SELF_RELATIVE = 0x8000;
2198         public const int SHIFT_PRESSED = 0x10; 
2199         public const int SHUTDOWN_NORETRY = 0x1;
2200         public const int SID_MAX_SUB_AUTHORITIES = (15);
2201         public const int SID_RECOMMENDED_SUB_AUTHORITIES = (1); 
2202         public const int SID_REVISION = (1); 
2203         public const int SLE_ERROR = 0x1;
2204         public const int SLE_MINORERROR = 0x2;
2205         public const int SLE_WARNING = 0x3;
2206         public const int SORT_CHINESE_BIG5 = 0x0; 
2207         public const int SORT_CHINESE_UNICODE = 0x1; 
2208         public const int SORT_DEFAULT = 0x0; 
2209         public const int SORT_JAPANESE_UNICODE = 0x1; 
2210         public const int SORT_JAPANESE_XJIS = 0x0; 
2211         public const int SORT_KOREAN_KSC = 0x0; 
2212         public const int SORT_KOREAN_UNICODE = 0x1; 
2213         public const int SORT_STRINGSORT = 0x1000; 
2214         public const int SPACEPARITY = 4;
2215         public const int SPECIFIC_RIGHTS_ALL = 0xFFFF;
2216         public const int SP_BAUD = 0x2;
2217         public const int SP_DATABITS = 0x4;
2218         public const int SP_HANDSHAKING = 0x10;
2219         public const int SP_PARITY = 0x1;
2220         public const int SP_PARITY_CHECK = 0x20;
2221         public const int SP_RLSD = 0x40;
2222         public const int SP_SERIALCOMM = 0x1;
2223         public const int SP_STOPBITS = 0x8;
2224         public const int STANDARD_RIGHTS_ALL = 0x1F0000;
2225         public const int STANDARD_RIGHTS_EXECUTE = (READ_CONTROL);
2226         public const int STANDARD_RIGHTS_READ = (READ_CONTROL);
2227         public const int STANDARD_RIGHTS_REQUIRED = 0xF0000;
2228         public const int STANDARD_RIGHTS_WRITE = (READ_CONTROL);
2229         public const int STARTF_FORCEOFFFEEDBACK = 0x80;
2230         public const int STARTF_FORCEONFEEDBACK = 0x40;
2231         public const int STARTF_RUNFULLSCREEN = 0x20; 
2232         public const int STARTF_USECOUNTCHARS = 0x8;
2233         public const int STARTF_USEFILLATTRIBUTE = 0x10;
2234         public const int STARTF_USEPOSITION = 0x4;
2235         public const int STARTF_USESHOWWINDOW = 0x1;
2236         public const int STARTF_USESIZE = 0x2;
2237         public const int STARTF_USESTDHANDLES = 0x100;
2238         public const int STD_ERROR_HANDLE = -12;
2239         public const int STD_INPUT_HANDLE = -10;
2240         public const int STD_OUTPUT_HANDLE = -11;
2241         public const int STOPBITS_10 = 0x1;
2242         public const int STOPBITS_15 = 0x2;
2243         public const int STOPBITS_20 = 0x4;
2244         public const int STREAM_CONTAINS_SECURITY = 0x2;
2245         public const int STREAM_MODIFIED_WHEN_READ = 0x1;
2246         public const int SUBLANG_CHINESE_HONGKONG = 0x3; 
2247         public const int SUBLANG_CHINESE_SIMPLIFIED = 0x2; 
2248         public const int SUBLANG_CHINESE_SINGAPORE = 0x4; 
2249         public const int SUBLANG_CHINESE_TRADITIONAL = 0x1; 
2250         public const int SUBLANG_DEFAULT = 0x1; 
2251         public const int SUBLANG_DUTCH = 0x1; 
2252         public const int SUBLANG_DUTCH_BELGIAN = 0x2; 
2253         public const int SUBLANG_ENGLISH_AUS = 0x3; 
2254         public const int SUBLANG_ENGLISH_CAN = 0x4; 
2255         public const int SUBLANG_ENGLISH_EIRE = 0x6; 
2256         public const int SUBLANG_ENGLISH_NZ = 0x5; 
2257         public const int SUBLANG_ENGLISH_UK = 0x2; 
2258         public const int SUBLANG_ENGLISH_US = 0x1; 
2259         public const int SUBLANG_FRENCH = 0x1; 
2260         public const int SUBLANG_FRENCH_BELGIAN = 0x2; 
2261         public const int SUBLANG_FRENCH_CANADIAN = 0x3; 
2262         public const int SUBLANG_FRENCH_SWISS = 0x4; 
2263         public const int SUBLANG_GERMAN = 0x1; 
2264         public const int SUBLANG_GERMAN_AUSTRIAN = 0x3; 
2265         public const int SUBLANG_GERMAN_SWISS = 0x2; 
2266         public const int SUBLANG_ITALIAN = 0x1; 
2267         public const int SUBLANG_ITALIAN_SWISS = 0x2; 
2268         public const int SUBLANG_NEUTRAL = 0x0; 
2269         public const int SUBLANG_NORWEGIAN_BOKMAL = 0x1; 
2270         public const int SUBLANG_NORWEGIAN_NYNORSK = 0x2; 
2271         public const int SUBLANG_PORTUGUESE = 0x2; 
2272         public const int SUBLANG_PORTUGUESE_BRAZILIAN = 0x1; 
2273         public const int SUBLANG_SPANISH = 0x1; 
2274         public const int SUBLANG_SPANISH_MEXICAN = 0x2; 
2275         public const int SUBLANG_SPANISH_MODERN = 0x3; 
2276         public const int SUBLANG_SYS_DEFAULT = 0x2; 
2277         public const int SUCCESSFUL_ACCESS_ACE_FLAG = 0x40;
2278         public const int SYNCHRONIZE = 0x100000;
2279         public const int SYSTEM_ALARM_ACE_TYPE = 0x3;
2280         public const int SYSTEM_AUDIT_ACE_TYPE = 0x2;
2281         public const int S_ALLTHRESHOLD = 2;
2282         public const int S_LEGATO = 1;
2283         public const int S_NORMAL = 0;
2284         public const int S_PERIOD1024 = 1; 
2285         public const int S_PERIOD2048 = 2; 
2286         public const int S_PERIOD512 = 0; 
2287         public const int S_PERIODVOICE = 3; 
2288         public const int S_QUEUEEMPTY = 0;
2289         public const int S_SERBDNT = (-5); 
2290         public const int S_SERDCC = (-7); 
2291         public const int S_SERDDR = (-14); 
2292         public const int S_SERDFQ = (-13); 
2293         public const int S_SERDLN = (-6); 
2294         public const int S_SERDMD = (-10); 
2295         public const int S_SERDPT = (-12); 
2296         public const int S_SERDSH = (-11); 
2297         public const int S_SERDSR = (-15); 
2298         public const int S_SERDST = (-16); 
2299         public const int S_SERDTP = (-8); 
2300         public const int S_SERDVL = (-9); 
2301         public const int S_SERDVNA = (-1); 
2302         public const int S_SERMACT = (-3); 
2303         public const int S_SEROFM = (-2); 
2304         public const int S_SERQFUL = (-4); 
2305         public const int S_STACCATO = 2;
2306         public const int S_THRESHOLD = 1;
2307         public const int S_WHITE1024 = 5; 
2308         public const int S_WHITE2048 = 6; 
2309         public const int S_WHITE512 = 4; 
2310         public const int S_WHITEVOICE = 7; 
2311         public const int SecurityAnonymous = 1;
2312         public const int SecurityIdentification = 2;
2313         public const int SidTypeAlias = 4;
2314         public const int SidTypeDeletedAccount = 6;
2315         public const int SidTypeDomain = 3;
2316         public const int SidTypeGroup = 2;
2317         public const int SidTypeInvalid = 7;
2318         public const int SidTypeUnknown = 8;
2319         public const int SidTypeUser = 1;
2320         public const int SidTypeWellKnownGroup = 5;
2321         public const int TC_GP_TRAP = 2;
2322         public const int TC_HARDERR = 1;
2323         public const int TC_NORMAL = 0;
2324         public const int TC_SIGNAL = 3;
2325         public const int TF_FORCEDRIVE = 0x80;
2326         public const int THREAD_BASE_PRIORITY_IDLE = -15;
2327         public const int THREAD_BASE_PRIORITY_LOWRT = 15;
2328         public const int THREAD_BASE_PRIORITY_MAX = 2;
2329         public const int THREAD_BASE_PRIORITY_MIN = -2;
2330         public const int THREAD_PRIORITY_ABOVE_NORMAL = (THREAD_PRIORITY_HIGHEST - 1);
2331         public const int THREAD_PRIORITY_BELOW_NORMAL = (THREAD_PRIORITY_LOWEST + 1);
2332         public const int THREAD_PRIORITY_ERROR_RETURN = (MAXLONG);
2333         public const int THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX;
2334         public const int THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE;
2335         public const int THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN;
2336         public const int THREAD_PRIORITY_NORMAL = 0;
2337         public const int THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT;
2338         public const int TIME_FORCE24HOURFORMAT = 0x8; 
2339         public const int TIME_NOMINUTESORSECONDS = 0x1; 
2340         public const int TIME_NOSECONDS = 0x2; 
2341         public const int TIME_NOTIMEMARKER = 0x4; 
2342         public const int TLS_OUT_OF_INDEXES = 0xFFFF;
2343         public const int TRUNCATE_EXISTING = 5;
2344         public const int TWOSTOPBITS = 2;
2345         public const int TokenDefaultDacl = 6;
2346         public const int TokenGroups = 2;
2347         public const int TokenImpersonationLevel = 9;
2348         public const int TokenOwner = 4;
2349         public const int TokenPrimaryGroup = 5;
2350         public const int TokenPrivileges = 3;
2351         public const int TokenSource = 7;
2352         public const int TokenStatistics = 10;
2353         public const int TokenType = 8;
2354         public const int TokenUser = 1;
2355         public const int UNLOAD_DLL_DEBUG_EVENT = 7;
2356         public const int VALID_INHERIT_FLAGS = 0xF;
2357         public const int VER_PLATFORM_WIN32_NT = 2;
2358         public const int VER_PLATFORM_WIN32_WINDOWS = 1;
2359         public const int VER_PLATFORM_WIN32s = 0;
2360         public const int WC_COMPOSITECHECK = 0x200; 
2361         public const int WC_DEFAULTCHAR = 0x40; 
2362         public const int WC_DEFAULTCHECK = 0x100; 
2363         public const int WC_DISCARDNS = 0x10; 
2364         public const int WC_SEPCHARS = 0x20; 
2365         public const int WINDOW_BUFFER_SIZE_EVENT = 0x4; 
2366         public const int WRITE_DAC = 0x40000;
2367         public const int WRITE_OWNER = 0x80000;
2368         public const int mouse_eventC = 0x2; 
2369         public const string SC_GROUP_IDENTIFIER = "+";
2370         public const string SERVICES_ACTIVE_DATABASE = "ServicesActive";
2371         public const string SERVICES_FAILED_DATABASE = "ServicesFailed";
2372         public const string SE_ASSIGNPRIMARYTOKEN_NAME = "SeAssignPrimaryTokenPrivilege";
2373         public const string SE_AUDIT_NAME = "SeAuditPrivilege";
2374         public const string SE_BACKUP_NAME = "SeBackupPrivilege";
2375         public const string SE_CHANGE_NOTIFY_NAME = "SeChangeNotifyPrivilege";
2376         public const string SE_CREATE_PAGEFILE_NAME = "SeCreatePagefilePrivilege";
2377         public const string SE_CREATE_PERMANENT_NAME = "SeCreatePermanentPrivilege";
2378         public const string SE_CREATE_TOKEN_NAME = "SeCreateTokenPrivilege";
2379         public const string SE_DEBUG_NAME = "SeDebugPrivilege";
2380         public const string SE_INCREASE_QUOTA_NAME = "SeIncreaseQuotaPrivilege";
2381         public const string SE_INC_BASE_PRIORITY_NAME = "SeIncreaseBasePriorityPrivilege";
2382         public const string SE_LOAD_DRIVER_NAME = "SeLoadDriverPrivilege";
2383         public const string SE_LOCK_MEMORY_NAME = "SeLockMemoryPrivilege";
2384         public const string SE_MACHINE_ACCOUNT_NAME = "SeMachineAccountPrivilege";
2385         public const string SE_PROF_SINGLE_PROCESS_NAME = "SeProfileSingleProcessPrivilege";
2386         public const string SE_REMOTE_SHUTDOWN_NAME = "SeRemoteShutdownPrivilege";
2387         public const string SE_RESTORE_NAME = "SeRestorePrivilege";
2388         public const string SE_SECURITY_NAME = "SeSecurityPrivilege";
2389         public const string SE_SHUTDOWN_NAME = "SeShutdownPrivilege";
2390         public const string SE_SYSTEMTIME_NAME = "SeSystemtimePrivilege";
2391         public const string SE_SYSTEM_ENVIRONMENT_NAME = "SeSystemEnvironmentPrivilege";
2392         public const string SE_SYSTEM_PROFILE_NAME = "SeSystemProfilePrivilege";
2393         public const string SE_TAKE_OWNERSHIP_NAME = "SeTakeOwnershipPrivilege";
2394         public const string SE_TCB_NAME = "SeTcbPrivilege";
2395         public const string SE_UNSOLICITED_INPUT_NAME = "SeUnsolicitedInputPrivilege";
2396     }
2397 }
View Code

User.cs

   1 using System;
   2 using System.Runtime.InteropServices;
   3 using System.Text;
   4 
   5 using HANDLE = System.IntPtr;
   6 using HWND = System.IntPtr;
   7 using HDC = System.IntPtr;
   8 
   9 namespace Win32
  10 {
  11     public struct CBTACTIVATESTRUCT 
  12     {
  13         public int fMouse;
  14         public HWND hwndActive;
  15     }
  16     public struct EVENTMSG 
  17     {
  18         public int message;
  19         public int paramL;
  20         public int paramH;
  21         public int time;
  22         public HWND hwnd;
  23     }
  24     public struct CWPSTRUCT 
  25     {
  26         public int lParam;
  27         public int wParam;
  28         public int message;
  29         public HWND hwnd;
  30     }
  31     public struct DEBUGHOOKINFO 
  32     {
  33         public HANDLE hModuleHook;
  34         public int Reserved;
  35         public int lParam;
  36         public int wParam;
  37         public int code;
  38     }
  39     public struct MOUSEHOOKSTRUCT 
  40     {
  41         public POINT pt;
  42         public HWND hwnd;
  43         public int wHitTestCode;
  44         public int dwExtraInfo;
  45     }
  46     public struct MINMAXINFO 
  47     {
  48         public POINT ptReserved;
  49         public POINT ptMaxSize;
  50         public POINT ptMaxPosition;
  51         public POINT ptMinTrackSize;
  52         public POINT ptMaxTrackSize;
  53     }
  54     public struct COPYDATASTRUCT 
  55     {
  56         public int dwData;
  57         public int cbData;
  58         public int lpData;
  59     }
  60     public struct WINDOWPOS 
  61     {
  62         public HWND hwnd;
  63         public HWND hwndInsertAfter;
  64         public int x;
  65         public int y;
  66         public int cx;
  67         public int cy;
  68         public int flags;
  69     }
  70     public struct ACCEL 
  71     {
  72         public byte fVirt;
  73         public short key;
  74         public short cmd;
  75     }
  76     public struct PAINTSTRUCT 
  77     {
  78         public HDC hdc;
  79         public int fErase;
  80         public RECT rcPaint;
  81         public int fRestore;
  82         public int fIncUpdate;
  83         [MarshalAs(UnmanagedType.ByValArray, SizeConst=32)] public byte rgbReserved;
  84     }
  85     public struct CREATESTRUCT 
  86     {
  87         public int lpCreateParams;
  88         public HANDLE hInstance;
  89         public HANDLE hMenu;
  90         public HWND hwndParent;
  91         public int cy;
  92         public int cx;
  93         public int y;
  94         public int x;
  95         public int style;
  96         public string lpszName;
  97         public string lpszClass;
  98         public int ExStyle;
  99     }
 100     public struct CBT_CREATEWND 
 101     {
 102         public CREATESTRUCT lpcs;
 103         public HWND hwndInsertAfter;
 104     }
 105     public struct WINDOWPLACEMENT 
 106     {
 107         public int Length;
 108         public int flags;
 109         public int showCmd;
 110         public POINT ptMinPosition;
 111         public POINT ptMaxPosition;
 112         public RECT rcNormalPosition;
 113     }
 114     public struct MEASUREITEMSTRUCT 
 115     {
 116         public int CtlType;
 117         public int CtlID;
 118         public int itemID;
 119         public int itemWidth;
 120         public int itemHeight;
 121         public int itemData;
 122     }
 123     public struct DRAWITEMSTRUCT 
 124     {
 125         public int CtlType;
 126         public int CtlID;
 127         public int itemID;
 128         public int itemAction;
 129         public int itemState;
 130         public HWND hwndItem;
 131         public HDC hdc;
 132         public RECT rcItem;
 133         public int itemData;
 134     }
 135     public struct DELETEITEMSTRUCT 
 136     {
 137         public int CtlType;
 138         public int CtlID;
 139         public int itemID;
 140         public HWND hwndItem;
 141         public int itemData;
 142     }
 143     public struct COMPAREITEMSTRUCT 
 144     {
 145         public int CtlType;
 146         public int CtlID;
 147         public HWND hwndItem;
 148         public int itemID1;
 149         public int itemData1;
 150         public int itemID2;
 151         public int itemData2;
 152     }
 153     public struct MSG 
 154     {
 155         public HWND hwnd;
 156         public int message;
 157         public int wParam;
 158         public int lParam;
 159         public int time;
 160         public POINT pt;
 161     }
 162     public struct WNDCLASS 
 163     {
 164         public int style;
 165         public int lpfnwndproc;
 166         public int cbClsextra;
 167         public int cbWndExtra2;
 168         public HANDLE hInstance;
 169         public HANDLE hIcon;
 170         public HANDLE hCursor;
 171         public HANDLE hbrBackground;
 172         public string lpszMenuName;
 173         public string lpszClassName;
 174     }
 175     public struct DLGTEMPLATE 
 176     {
 177         public int style;
 178         public int dwExtendedStyle;
 179         public short cdit;
 180         public short x;
 181         public short y;
 182         public short cx;
 183         public short cy;
 184     }
 185     public struct DLGITEMTEMPLATE 
 186     {
 187         public int style;
 188         public int dwExtendedStyle;
 189         public short x;
 190         public short y;
 191         public short cx;
 192         public short cy;
 193         public short id;
 194     }
 195     public struct MENUITEMTEMPLATEHEADER 
 196     {
 197         public short versionNumber;
 198         public short offset;
 199     }
 200     public struct MENUITEMTEMPLATE 
 201     {
 202         public short mtOption;
 203         public short mtID;
 204         public byte mtString;
 205     }
 206     public struct ICONINFO 
 207     {
 208         public int fIcon;
 209         public int xHotspot;
 210         public int yHotspot;
 211         public HANDLE hbmMask;
 212         public HANDLE hbmColor;
 213     }
 214     public struct MDICREATESTRUCT 
 215     {
 216         public string szClass;
 217         public string szTitle;
 218         public HWND hOwner;
 219         public int x;
 220         public int y;
 221         public int cx;
 222         public int cy;
 223         public int style;
 224         public int lParam;
 225     }
 226     public struct CLIENTCREATESTRUCT 
 227     {
 228         public HANDLE hWindowMenu;
 229         public int idFirstChild;
 230     }
 231     public struct MULTIKEYHELP 
 232     {
 233         public int mkSize;
 234         public byte mkKeylist;
 235         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=253)] public string szKeyphrase; 
 236     }
 237     public struct HELPWININFO 
 238     {
 239         public int wStructSize;
 240         public int x;
 241         public int y;
 242         public int dx;
 243         public int dy;
 244         public int wMax;
 245         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=2)] public string rgchMember;
 246     }
 247     public struct DDEACK 
 248     {
 249         public short bAppReturnCode;
 250         public short Reserved;
 251         public short fbusy;
 252         public short fack;
 253     }
 254     public struct DDEADVISE 
 255     {
 256         public short Reserved;
 257         public short fDeferUpd;
 258         public short fAckReq;
 259         public short cfFormat;
 260     }
 261     public struct DDEDATA 
 262     {
 263         public short unused;
 264         public short fresponse;
 265         public short fRelease;
 266         public short Reserved;
 267         public short fAckReq;
 268         public short cfFormat;
 269         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public byte Value;
 270     }
 271     public struct DDEPOKE 
 272     {
 273         public short unused;
 274         public short fRelease;
 275         public short fReserved;
 276         public short cfFormat;
 277         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public byte Value;
 278     }
 279     public struct DDELN 
 280     {
 281         public short unused;
 282         public short fRelease;
 283         public short fDeferUpd;
 284         public short fAckReq;
 285         public short cfFormat;
 286     }
 287     public struct DDEUP 
 288     {
 289         public short unused;
 290         public short fAck;
 291         public short fRelease;
 292         public short fReserved;
 293         public short fAckReq;
 294         public short cfFormat;
 295         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1)] public byte rgb;
 296     }
 297     public struct HSZPAIR 
 298     {
 299         public HANDLE hszSvc;
 300         public HANDLE hszTopic;
 301     }
 302     public struct SECURITY_QUALITY_OF_SERVICE 
 303     {
 304         public int Length;
 305         public short Impersonationlevel;
 306         public short ContextTrackingMode;
 307         public int EffectiveOnly;
 308     }
 309     public struct CONVCONTEXT 
 310     {
 311         public int cb;
 312         public int wFlags;
 313         public int wCountryID;
 314         public int iCodePage;
 315         public int dwLangID;
 316         public int dwSecurity;
 317         public SECURITY_QUALITY_OF_SERVICE qos;
 318     }
 319     public struct CONVINFO 
 320     {
 321         public int cb;
 322         public HANDLE hUser;
 323         public HANDLE hConvPartner;
 324         public HANDLE hszSvcPartner;
 325         public HANDLE hszServiceReq;
 326         public HANDLE hszTopic;
 327         public HANDLE hszItem;
 328         public int wFmt;
 329         public int wType;
 330         public int wStatus;
 331         public int wConvst;
 332         public int wLastError;
 333         public HANDLE hConvList;
 334         public CONVCONTEXT ConvCtxt;
 335         public HWND hwnd;
 336         public HWND hwndPartner;
 337     }
 338     public struct DDEML_MSG_HOOK_DATA 
 339     { 
 340         public int uiLo; 
 341         public int uiHi;
 342         public int cbData; 
 343         [MarshalAs(UnmanagedType.ByValArray, SizeConst=8)] public int Data; 
 344     }
 345     public struct MONMSGSTRUCT 
 346     {
 347         public int cb;
 348         public HWND hwndTo;
 349         public int dwTime;
 350         public HANDLE htask;
 351         public int wMsg;
 352         public int wParam;
 353         public int lParam;
 354         public DDEML_MSG_HOOK_DATA dmhd; 
 355     }
 356     public struct MONCBSTRUCT 
 357     {
 358         public int cb;
 359         public int dwTime;
 360         public HANDLE htask;
 361         public int dwRet;
 362         public int wType;
 363         public int wFmt;
 364         public HANDLE hConv;
 365         public HANDLE hsz1;
 366         public HANDLE hsz2;
 367         public HANDLE hData;
 368         public int dwData1;
 369         public int dwData2;
 370         public CONVCONTEXT cc; 
 371         public int cbData; 
 372         [MarshalAs(UnmanagedType.ByValArray, SizeConst=8)] public int Data; 
 373     }
 374     public struct MONHSZSTRUCT 
 375     {
 376         public int cb;
 377         public int fsAction; 
 378         public int dwTime;
 379         public HANDLE hsz;
 380         public HANDLE htask;
 381         public byte str;
 382     }
 383     public struct MONERRSTRUCT 
 384     {
 385         public int cb;
 386         public int wLastError;
 387         public int dwTime;
 388         public HANDLE htask;
 389     }
 390     public struct MONLINKSTRUCT 
 391     {
 392         public int cb;
 393         public int dwTime;
 394         public HANDLE htask;
 395         public int fEstablished;
 396         public int fNoData;
 397         public HANDLE hszSvc;
 398         public HANDLE hszTopic;
 399         public HANDLE hszItem;
 400         public int wFmt;
 401         public int fServer;
 402         public HANDLE hConvServer;
 403         public HANDLE hConvClient;
 404     }
 405     public struct MONCONVSTRUCT 
 406     {
 407         public int cb;
 408         public int fConnect;
 409         public int dwTime;
 410         public HANDLE htask;
 411         public HANDLE hszSvc;
 412         public HANDLE hszTopic;
 413         public HANDLE hConvClient; 
 414         public HANDLE hConvServer; 
 415     }
 416     public struct DRAWTEXTPARAMS 
 417     {
 418         public int cbSize;
 419         public int iTabLength;
 420         public int iLeftMargin;
 421         public int iRightMargin;
 422         public int uiLengthDrawn;
 423     }
 424     public struct MENUITEMINFO 
 425     {
 426         public int cbSize;
 427         public int fMask;
 428         public int fType;
 429         public int fState;
 430         public int wID;
 431         public HANDLE hSubMenu;
 432         public HANDLE hbmpChecked;
 433         public HANDLE hbmpUnchecked;
 434         public int dwItemData;
 435         public string dwTypeData;
 436         public int cch;
 437     }
 438     public struct SCROLLINFO 
 439     {
 440         public int cbSize;
 441         public int fMask;
 442         public int nMin;
 443         public int nMax;
 444         public int nPage;
 445         public int nPos;
 446         public int nTrackPos;
 447     }
 448     public struct MSGBOXPARAMS 
 449     {
 450         public int cbSize;
 451         public HWND hwndOwner;
 452         public HANDLE hInstance;
 453         public string lpszText;
 454         public string lpszCaption;
 455         public int dwStyle;
 456         public string lpszIcon;
 457         public int dwContextHelpId;
 458         public int lpfnMsgBoxCallback;
 459         public int dwLanguageId;
 460     }
 461     public struct WNDCLASSEX 
 462     {
 463         public int cbSize;
 464         public int style;
 465         public int lpfnWndProc;
 466         public int cbClsExtra;
 467         public int cbWndExtra;
 468         public HANDLE hInstance;
 469         public HANDLE hIcon;
 470         public HANDLE hCursor;
 471         public HANDLE hbrBackground;
 472         public string lpszMenuName;
 473         public string lpszClassName;
 474         public HANDLE hIconSm;
 475     }
 476     public struct TPMPARAMS 
 477     {
 478         public int cbSize;
 479         public RECT rcExclude;
 480     }
 481     public struct BROWSEINFO 
 482     {
 483         public HWND hwndOwner;
 484         public int pIDLRoot;
 485         public int pszDisplayName;
 486         public int lpszTitle;
 487         public int ulFlags;
 488         public int lpfnCallback;
 489         public int lParam;
 490         public int iImage;
 491     }
 492 
 493     public abstract class ComCtl
 494     {
 495         [DllImport("COMCTL32")] public static extern int ImageList_AddIcon(HANDLE himl, HANDLE hIcon);
 496         [DllImport("COMCTL32")] public static extern int ImageList_Create(int MinCx, int MinCy, int flags, int cInitial, int cGrow);
 497         [DllImport("COMCTL32")] public static extern int ImageList_Draw(HANDLE hIMAGELIST, int ImgIndex, HWND hdcDest, int xDest, int yDest, int lStyle);
 498         [DllImport("COMCTL32")] public static extern int ImageList_GetIcon(HANDLE hIMAGELIST, int ImgIndex, HANDLE hbmMask);
 499         [DllImport("COMCTL32")] public static extern int InitCommonControls();
 500     }
 501 
 502     public abstract class Ole
 503     {
 504         [DllImport("ole32")] public static extern int OleInitialize(IntPtr vbNullString);
 505         [DllImport("ole32")] public static extern void CoTaskMemFree(HANDLE hMem);
 506         [DllImport("ole32")] public static extern void OleUninitialize();
 507     }
 508     
 509     public class User
 510     {
 511         [DllImport("advapi32")] public static extern int SetServiceBits(HANDLE hServiceStatus, int dwServiceBits, int bSetBitsOn, int bUpdateImmediately);
 512         [DllImport("kernel32")] public static extern int SetSystemTimeAdjustment(int dwTimeAdjustment, int bTimeAdjustmentDisabled);
 513         [DllImport("mpr")] public static extern int WNetGetUniversalName(string lpLocalPath, int dwInfoLevel, StringBuilder lpBuffer, ref int lpBufferSize);
 514         [DllImport("user32")] public static extern int ActivateKeyboardLayout(HANDLE hKL, int flags);
 515         [DllImport("user32")] public static extern int AdjustWindowRect(ref RECT lpRect, int dwStyle, int bMenu);
 516         [DllImport("user32")] public static extern int AdjustWindowRectEx(ref RECT lpRect, int dsStyle, int bMenu, int dwEsStyle);
 517         [DllImport("user32")] public static extern int AnyPopup();
 518         [DllImport("user32")] public static extern int AppendMenu(HANDLE hMenu, int wFlags, int wIDNewItem, IntPtr lpNewItem);
 519         [DllImport("user32")] public static extern int ArrangeIconicWindows(HWND hwnd);
 520         [DllImport("user32")] public static extern int AttachThreadInput(int idAttach, int idAttachTo, int fAttach);
 521         [DllImport("user32")] public static extern int BeginDeferWindowPos(int nNumWindows);
 522         [DllImport("user32")] public static extern int BeginPaint(HWND hwnd, ref PAINTSTRUCT lpPaint);
 523         [DllImport("user32")] public static extern int BringWindowToTop(HWND hwnd);
 524         [DllImport("user32")] public static extern int BroadcastSystemMessage(int dw, ref int pdw, int un, int wParam, int lParam);
 525         [DllImport("user32")] public static extern int CallMsgFilter(ref MSG lpMsg, int ncode);
 526         [DllImport("user32")] public static extern int CallNextHookEx(HANDLE hHook, int ncode, int wParam, IntPtr lParam);
 527         [DllImport("user32")] public static extern int CallWindowProc(int lpPrevWndFunc, HWND hwnd, int Msg, int wParam, int lParam);
 528         [DllImport("user32")] public static extern int ChangeClipboardChain(HWND hwnd, HWND hwndNext);
 529         [DllImport("user32")] public static extern int ChangeMenu(HANDLE hMenu, int cmd, string lpszNewItem, int cmdInsert, int flags);
 530         [DllImport("user32")] public static extern int CharLowerBuff(string lpsz, int cchLength);
 531         [DllImport("user32")] public static extern int CharToOem(string lpszSrc, string lpszDst);
 532         [DllImport("user32")] public static extern int CharToOemBuff(string lpszSrc, string lpszDst, int cchDstLength);
 533         [DllImport("user32")] public static extern int CharUpperBuff(string lpsz, int cchLength);
 534         [DllImport("user32")] public static extern int CheckDlgButton(HANDLE hDlg, int nIDButton, int wCheck);
 535         [DllImport("user32")] public static extern int CheckMenuItem(HANDLE hMenu, int wIDCheckItem, int wCheck);
 536         [DllImport("user32")] public static extern int CheckMenuRadioItem(HANDLE hMenu, int un1, int un2, int un3, int un4);
 537         [DllImport("user32")] public static extern int CheckRadioButton(HANDLE hDlg, int nIDFirstButton, int nIDLastButton, int nIDCheckButton);
 538         [DllImport("user32")] public static extern int ChildWindowFromPoint(HWND hwnd, int xPoint, int yPoint);
 539         [DllImport("user32")] public static extern int ChildWindowFromPointEx(HWND hwnd, int xPoint, int yPoint, int un);
 540         [DllImport("user32")] public static extern int ClientToScreen(HWND hwnd, ref POINT lpPoint);
 541         [DllImport("user32")] public static extern int ClipCursor(ref RECT lpRect);
 542         [DllImport("user32")] public static extern int CloseClipboard();
 543         [DllImport("user32")] public static extern int CloseDesktop(HANDLE hDesktop);
 544         [DllImport("user32")] public static extern int CloseWindow(HWND hwnd);
 545         [DllImport("user32")] public static extern int CloseWindowStation(HANDLE hWinSta);
 546         [DllImport("user32")] public static extern int CopyAcceleratorTable(HANDLE hAccelSrc, ACCEL[] lpAccelDst, int cAccelEntries);
 547         [DllImport("user32")] public static extern int CopyCursor(HANDLE hcur);
 548         [DllImport("user32")] public static extern int CopyIcon(HANDLE hIcon);
 549         [DllImport("user32")] public static extern int CopyImage(HANDLE handle, int un1, int n1, int n2, int un2);
 550         [DllImport("user32")] public static extern int CopyRect(ref RECT lpDestRect, ref RECT lpSourceRect);
 551         [DllImport("user32")] public static extern int CountClipboardFormats();
 552         [DllImport("user32")] public static extern int CreateAcceleratorTable(ref ACCEL lpaccl, int cEntries);
 553         [DllImport("user32")] public static extern int CreateCaret(HWND hwnd, HANDLE hBitmap, int nWidth, int nHeight);
 554         [DllImport("user32")] public static extern int CreateCursor(HANDLE hInstance, int nXhotspot, int nYhotspot, int nWidth, int nHeight, IntPtr lpANDbitPlane, IntPtr lpXORbitPlane);
 555         [DllImport("user32")] public static extern int CreateDesktop(string lpszDesktop, string lpszDevice, ref DEVMODE pDevmode, int dwFlags, int dwDesiredAccess, ref SECURITY_ATTRIBUTES lpsa);
 556         [DllImport("user32")] public static extern int CreateDialogIndirectParam(HANDLE hInstance, ref DLGTEMPLATE lpTemplate, HWND hwndParent, ref int lpDialogFunc, int dwInitParam);
 557         [DllImport("user32")] public static extern int CreateDialogParam(HANDLE hInstance, string lpName, HWND hwndParent, ref int lpDialogFunc, int lParamInit);
 558         [DllImport("user32")] public static extern int CreateIcon(HANDLE hInstance, int nWidth, int nHeight, Byte nPlanes, Byte nBitsPixel, Byte lpANDbits, Byte lpXORbits);
 559         [DllImport("user32")] public static extern int CreateIconFromResource(Byte presbits, int dwResSize, int fIcon, int dwVer);
 560         [DllImport("user32")] public static extern int CreateIconIndirect(ref ICONINFO piconinfo);
 561         [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);
 562         [DllImport("user32")] public static extern int CreateMenu();
 563         [DllImport("user32")] public static extern int CreatePopupMenu();
 564         [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);
 565         [DllImport("user32")] public static extern int DdeAbandonTransaction(int idInst, HANDLE hConv, int idTransaction);
 566         [DllImport("user32")] public static extern int DdeAccessData(HANDLE hData, ref int pcbDataSize);
 567         [DllImport("user32")] public static extern int DdeAddData(HANDLE hData, Byte pSrc, int cb, int cbOff);
 568         [DllImport("user32")] public static extern int DdeClientTransaction(Byte pData, int cbData, HANDLE hConv, HANDLE hszItem, int wFmt, int wType, int dwTimeout, ref int pdwResult);
 569         [DllImport("user32")] public static extern int DdeCmpStringHandles(HANDLE hsz1, HANDLE hsz2);
 570         [DllImport("user32")] public static extern int DdeConnect(int idInst, HANDLE hszService, HANDLE hszTopic, ref CONVCONTEXT pCC);
 571         [DllImport("user32")] public static extern int DdeConnectList(int idInst, HANDLE hszService, HANDLE hszTopic, HANDLE hConvList, ref CONVCONTEXT pCC);
 572         [DllImport("user32")] public static extern int DdeCreateDataHandle(int idInst, Byte pSrc, int cb, int cbOff, HANDLE hszItem, int wFmt, int afCmd);
 573         [DllImport("user32")] public static extern int DdeCreateStringHandle(int idInst, string psz, int iCodePage);
 574         [DllImport("user32")] public static extern int DdeDisconnect(HANDLE hConv);
 575         [DllImport("user32")] public static extern int DdeDisconnectList(HANDLE hConvList);
 576         [DllImport("user32")] public static extern int DdeEnableCallback(int idInst, HANDLE hConv, int wCmd);
 577         [DllImport("user32")] public static extern int DdeFreeDataHandle(HANDLE hData);
 578         [DllImport("user32")] public static extern int DdeFreeStringHandle(int idInst, HANDLE hsz);
 579         [DllImport("user32")] public static extern int DdeGetData(HANDLE hData, Byte pDst, int cbMax, int cbOff);
 580         [DllImport("user32")] public static extern int DdeGetLastError(int idInst);
 581         [DllImport("user32")] public static extern int DdeImpersonateClient(HANDLE hConv);
 582         [DllImport("user32")] public static extern int DdeKeepStringHandle(int idInst, HANDLE hsz);
 583         [DllImport("user32")] public static extern int DdeNameService(int idInst, HANDLE hsz1, HANDLE hsz2, int afCmd);
 584         [DllImport("user32")] public static extern int DdePostAdvise(int idInst, HANDLE hszTopic, HANDLE hszItem);
 585         [DllImport("user32")] public static extern int DdeQueryConvInfo(HANDLE hConv, int idTransaction, ref CONVINFO pConvInfo);
 586         [DllImport("user32")] public static extern int DdeQueryNextServer(HANDLE hConvList, HANDLE hConvPrev);
 587         [DllImport("user32")] public static extern int DdeQueryString(int idInst, HANDLE hsz, string psz, int cchMax, int iCodePage);
 588         [DllImport("user32")] public static extern int DdeReconnect(HANDLE hConv);
 589         [DllImport("user32")] public static extern int DdeSetQualityOfService(HWND hwndClient, ref SECURITY_QUALITY_OF_SERVICE pqosNew, ref SECURITY_QUALITY_OF_SERVICE pqosPrev);
 590         [DllImport("user32")] public static extern int DdeSetUserHandle(HANDLE hConv, int id, HANDLE hUser);
 591         [DllImport("user32")] public static extern int DdeUnaccessData(HANDLE hData);
 592         [DllImport("user32")] public static extern int DdeUninitialize(int idInst);
 593         [DllImport("user32")] public static extern int DefDlgProc(HANDLE hDlg, int wMsg, int wParam, int lParam);
 594         [DllImport("user32")] public static extern int DefFrameProc(HWND hwnd, HWND hwndMDIClient, int wMsg, int wParam, int lParam);
 595         [DllImport("user32")] public static extern int DefMDIChildProc(HWND hwnd, int wMsg, int wParam, int lParam);
 596         [DllImport("user32")] public static extern int DefWindowProc(HWND hwnd, int wMsg, int wParam, int lParam);
 597         [DllImport("user32")] public static extern int DeferWindowPos(HANDLE hWinPosInfo, HWND hwnd, HWND hwndInsertAfter, int x, int y, int cx, int cy, int wFlags);
 598         [DllImport("user32")] public static extern int DeleteMenu(HANDLE hMenu, int nPosition, int wFlags);
 599         [DllImport("user32")] public static extern int DestroyAcceleratorTable(HANDLE haccel);
 600         [DllImport("user32")] public static extern int DestroyCaret();
 601         [DllImport("user32")] public static extern int DestroyCursor(HANDLE hCursor);
 602         [DllImport("user32")] public static extern int DestroyIcon(HANDLE hIcon);
 603         [DllImport("user32")] public static extern int DestroyMenu(HANDLE hMenu);
 604         [DllImport("user32")] public static extern int DestroyWindow(HWND hwnd);
 605         [DllImport("user32")] public static extern int DialogBoxIndirectParam(HANDLE hInstance, DLGTEMPLATE hDialogTemplate, HWND hwndParent, ref int lpDialogFunc, int dwInitParam);
 606         [DllImport("user32")] public static extern int DispatchMessage(ref MSG lpMsg);
 607         [DllImport("user32")] public static extern int DlgDirList(HANDLE hDlg, string lpPathSpec, int nIDListBox, int nIDStaticPath, int wFileType);
 608         [DllImport("user32")] public static extern int DlgDirListComboBox(HANDLE hDlg, string lpPathSpec, int nIDComboBox, int nIDStaticPath, int wFileType);
 609         [DllImport("user32")] public static extern int DlgDirSelectComboBoxEx(HWND hwndDlg, string lpszPath, int cbPath, int idComboBox);
 610         [DllImport("user32")] public static extern int DlgDirSelectEx(HWND hwndDlg, string lpszPath, int cbPath, int idListBox);
 611         [DllImport("user32")] public static extern int DragDetect(HWND hwnd, POINT pt);
 612         [DllImport("user32")] public static extern int DragObject(HWND hwnd1, HWND hwnd2, int un, int dw, HANDLE hCursor);
 613         [DllImport("user32")] public static extern int DrawAnimatedRects(HWND hwnd, int idAni, ref RECT lprcFrom, ref RECT lprcTo);
 614         [DllImport("user32")] public static extern int DrawCaption(HWND hwnd, HWND hdc, ref RECT pcRect, int un);
 615         [DllImport("user32")] public static extern int DrawEdge(HDC hdc, ref RECT qrc, int edge, int grfFlags);
 616         [DllImport("user32")] public static extern int DrawFocusRect(HDC hdc, ref RECT lpRect);
 617         [DllImport("user32")] public static extern int DrawFrameControl(HWND hdc, ref RECT lpRect, int un1, int un2);
 618         [DllImport("user32")] public static extern int DrawIcon(HDC hdc, int x, int y, HANDLE hIcon);
 619         [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);
 620         [DllImport("user32")] public static extern int DrawMenuBar(HWND hwnd);
 621         [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);
 622         [DllImport("user32")] public static extern int DrawText(HDC hdc, string lpStr, int nCount, ref RECT lpRect, int wFormat);
 623         [DllImport("user32")] public static extern int DrawTextEx(HWND hdc, string lpsz, int n, ref RECT lpRect, int un, ref DRAWTEXTPARAMS lpDrawTextParams);
 624         [DllImport("user32")] public static extern int EmptyClipboard();
 625         [DllImport("user32")] public static extern int EnableMenuItem(HANDLE hMenu, int wIDEnableItem, int wEnable);
 626         [DllImport("user32")] public static extern int EnableScrollBar(HWND hwnd, int wSBflags, int wArrows);
 627         [DllImport("user32")] public static extern int EnableWindow(HWND hwnd, int fEnable);
 628         [DllImport("user32")] public static extern int EndDeferWindowPos(HANDLE hWinPosInfo);
 629         [DllImport("user32")] public static extern int EndDialog(HANDLE hDlg, int nResult);
 630         [DllImport("user32")] public static extern int EndPaint(HWND hwnd, ref PAINTSTRUCT lpPaint);
 631         [DllImport("user32")] public static extern int EnumChildWindows(HWND hwndParent, ref int lpEnumFunc, int lParam);
 632         [DllImport("user32")] public static extern int EnumClipboardFormats(int wFormat);
 633         [DllImport("user32")] public static extern int EnumDesktopWindows(HANDLE hDesktop, ref int lpfn, int lParam);
 634         [DllImport("user32")] public static extern int EnumDesktops(HANDLE hwinsta, ref int lpEnumFunc, int lParam);
 635         [DllImport("user32")] public static extern int EnumProps(HWND hwnd, ref int lpEnumFunc);
 636         [DllImport("user32")] public static extern int EnumPropsEx(HWND hwnd, ref int lpEnumFunc, int lParam);
 637         [DllImport("user32")] public static extern int EnumThreadWindows(int dwThreadId, ref int lpfn, int lParam);
 638         [DllImport("user32")] public static extern int EnumWindowStations(int lpEnumFunc, int lParam);
 639         [DllImport("user32")] public static extern int EnumWindows(int lpEnumFunc, int lParam);
 640         [DllImport("user32")] public static extern int EqualRect(ref RECT lpRect1, ref RECT lpRect2);
 641         [DllImport("user32")] public static extern int ExcludeUpdateRgn(HDC hdc, HWND hwnd);
 642         [DllImport("user32")] public static extern int ExitWindows(int dwReserved, int uReturnCode);
 643         [DllImport("user32")] public static extern int ExitWindowsEx(int uFlags, int dwReserved);
 644         [DllImport("user32")] public static extern int FillRect(HDC hdc, ref RECT lpRect, HANDLE hBrush);
 645         [DllImport("user32")] public static extern int FindWindow(string lpClassName, string lpWindowName);
 646         [DllImport("user32")] public static extern int FindWindowEx(HWND hwnd1, HWND hwnd2, string lpsz1, string lpsz2);
 647         [DllImport("user32")] public static extern int FlashWindow(HWND hwnd, int bInvert);
 648         [DllImport("user32")] public static extern int FrameRect(HDC hdc, ref RECT lpRect, HANDLE hBrush);
 649         [DllImport("user32")] public static extern int FreeDDElParam(int msg, int lParam);
 650         [DllImport("user32")] public static extern int GetActiveWindow();
 651         [DllImport("user32")] public static extern int GetCapture();
 652         [DllImport("user32")] public static extern int GetCaretBlinkTime();
 653         [DllImport("user32")] public static extern int GetCaretPos(ref POINT lpPoint);
 654         [DllImport("user32")] public static extern int GetClassInfo(HANDLE hInstance, string lpClassName, out WNDCLASS lpWndClass);
 655         [DllImport("user32")] public static extern int GetClassLong(HWND hwnd, int nIndex);
 656         [DllImport("user32")] public static extern int GetClassName(HWND hwnd, string lpClassName, int nMaxCount);
 657         [DllImport("user32")] public static extern int GetClassWord(HWND hwnd, int nIndex);
 658         [DllImport("user32")] public static extern int GetClientRect(HWND hwnd, ref RECT lpRect);
 659         [DllImport("user32")] public static extern int GetClipCursor(out RECT lprc);
 660         [DllImport("user32")] public static extern int GetClipboardData(int wFormat);
 661         [DllImport("user32")] public static extern int GetClipboardFormatName(int wFormat, string lpString, int nMaxCount);
 662         [DllImport("user32")] public static extern int GetClipboardOwner();
 663         [DllImport("user32")] public static extern int GetClipboardViewer();
 664         [DllImport("user32")] public static extern int GetCursor();
 665         [DllImport("user32")] public static extern int GetCursorPos(out POINT lpPoint);
 666         [DllImport("user32")] public static extern int GetDC(HWND hwnd);
 667         [DllImport("user32")] public static extern int GetDCEx(HWND hwnd, HANDLE hrgnclip, int fdwOptions);
 668         [DllImport("user32")] public static extern int GetDesktopWindow();
 669         [DllImport("user32")] public static extern int GetDialogBaseUnits();
 670         [DllImport("user32")] public static extern int GetDlgCtrlID(HWND hwnd);
 671         [DllImport("user32")] public static extern int GetDlgItem(HANDLE hDlg, int nIDDlgItem);
 672         [DllImport("user32")] public static extern int GetDlgItemInt(HANDLE hDlg, int nIDDlgItem, ref int lpTranslated, int bSigned);
 673         [DllImport("user32")] public static extern int GetDlgItemText(HANDLE hDlg, int nIDDlgItem, StringBuilder lpString, int nMaxCount);
 674         [DllImport("user32")] public static extern int GetDoubleClickTime();
 675         [DllImport("user32")] public static extern int GetFocus();
 676         [DllImport("user32")] public static extern int GetForegroundWindow();
 677         [DllImport("user32")] public static extern int GetIconInfo(HANDLE hIcon, out ICONINFO piconinfo);
 678         [DllImport("user32")] public static extern int GetInputState();
 679         [DllImport("user32")] public static extern int GetKBCodePage();
 680         [DllImport("user32")] public static extern int GetKeyNameText(int lParam, StringBuilder lpBuffer, int nSize);
 681         [DllImport("user32")] public static extern int GetKeyboardLayout(int dwLayout);
 682         [DllImport("user32")] public static extern int GetKeyboardLayoutList(int nBuff, ref int lpList);
 683         [DllImport("user32")] public static extern int GetKeyboardLayoutName(string pwszKLID);
 684         [DllImport("user32")] public static extern int GetKeyboardState(Byte pbKeyState);
 685         [DllImport("user32")] public static extern int GetKeyboardType(int nTypeFlag);
 686         [DllImport("user32")] public static extern int GetLastActivePopup(HWND hwndOwnder);
 687         [DllImport("user32")] public static extern int GetMenu(HWND hwnd);
 688         [DllImport("user32")] public static extern int GetMenuCheckMarkDimensions();
 689         [DllImport("user32")] public static extern int GetMenuContextHelpId(HANDLE hMenu);
 690         [DllImport("user32")] public static extern int GetMenuDefaultItem(HANDLE hMenu, int fByPos, int gmdiFlags);
 691         [DllImport("user32")] public static extern int GetMenuItemCount(HANDLE hMenu);
 692         [DllImport("user32")] public static extern int GetMenuItemID(HANDLE hMenu, int nPos);
 693         [DllImport("user32")] public static extern int GetMenuItemInfo(HANDLE hMenu, int un, int b, ref MENUITEMINFO lpMenuItemInfo);
 694         [DllImport("user32")] public static extern int GetMenuItemRect(HWND hwnd, HANDLE hMenu, int uItem, ref RECT lprcItem);
 695         [DllImport("user32")] public static extern int GetMenuState(HANDLE hMenu, int wID, int wFlags);
 696         [DllImport("user32")] public static extern int GetMenuString(HANDLE hMenu, int wIDItem, StringBuilder lpString, int nMaxCount, int wFlag);
 697         [DllImport("user32")] public static extern int GetMessage(ref MSG lpMsg, HWND hwnd, int wMsgFilterMin, int wMsgFilterMax);
 698         [DllImport("user32")] public static extern int GetMessageExtraInfo();
 699         [DllImport("user32")] public static extern int GetMessagePos();
 700         [DllImport("user32")] public static extern int GetMessageTime();
 701         [DllImport("user32")] public static extern int GetNextDlgGroupItem(HANDLE hDlg, HANDLE hCtl, int bPrevious);
 702         [DllImport("user32")] public static extern int GetNextDlgTabItem(HANDLE hDlg, HANDLE hCtl, int bPrevious);
 703         [DllImport("user32")] public static extern int GetNextWindow(HWND hwnd, int wFlag);
 704         [DllImport("user32")] public static extern int GetOpenClipboardWindow();
 705         [DllImport("user32")] public static extern int GetParent(HWND hwnd);
 706         [DllImport("user32")] public static extern int GetPriorityClipboardFormat(int lpPriorityList, int nCount);
 707         [DllImport("user32")] public static extern int GetProcessWindowStation();
 708         [DllImport("user32")] public static extern int GetProp(HWND hwnd, string lpString);
 709         [DllImport("user32")] public static extern int GetQueueStatus(int fuFlags);
 710         [DllImport("user32")] public static extern int GetScrollInfo(HWND hwnd, int n, ref SCROLLINFO lpScrollInfo);
 711         [DllImport("user32")] public static extern int GetScrollPos(HWND hwnd, int nBar);
 712         [DllImport("user32")] public static extern int GetScrollRange(HWND hwnd, int nBar, ref int lpMinPos, ref int lpMaxPos);
 713         [DllImport("user32")] public static extern int GetSubMenu(HANDLE hMenu, int nPos);
 714         [DllImport("user32")] public static extern int GetSysColor(int nIndex);
 715         [DllImport("user32")] public static extern int GetSysColorBrush(int nIndex);
 716         [DllImport("user32")] public static extern int GetSystemMenu(HWND hwnd, int bRevert);
 717         [DllImport("user32")] public static extern int GetSystemMetrics(int nIndex);
 718         [DllImport("user32")] public static extern int GetTabbedTextExtent(HDC hdc, string lpString, int nCount, int nTabPositions, ref int lpnTabStopPositions);
 719         [DllImport("user32")] public static extern int GetThreadDesktop(int dwThread);
 720         [DllImport("user32")] public static extern int GetTopWindow(HWND hwnd);
 721         [DllImport("user32")] public static extern int GetUpdateRect(HWND hwnd, ref RECT lpRect, int bErase);
 722         [DllImport("user32")] public static extern int GetUpdateRgn(HWND hwnd, HANDLE hRgn, int fErase);
 723         [DllImport("user32")] public static extern int GetUserObjectInformation(HANDLE hObj, int nIndex, IntPtr pvInfo, int nLength, ref int lpnLengthNeeded);
 724         [DllImport("user32")] public static extern int GetUserObjectSecurity(HANDLE hObj, ref int pSIRequested, ref SECURITY_DESCRIPTOR pSd, int nLength, ref int lpnLengthNeeded);
 725         [DllImport("user32")] public static extern int GetWindow(HWND hwnd, int wCmd);
 726         [DllImport("user32")] public static extern int GetWindowContextHelpId(HWND hwnd);
 727         [DllImport("user32")] public static extern int GetWindowDC(HWND hwnd);
 728         [DllImport("user32")] public static extern int GetWindowLong(HWND hwnd, int nIndex);
 729         [DllImport("user32")] public static extern int GetWindowPlacement(HWND hwnd, ref WINDOWPLACEMENT lpwndpl);
 730         [DllImport("user32")] public static extern int GetWindowRect(HWND hwnd, ref RECT lpRect);
 731         [DllImport("user32")] public static extern int GetWindowRgn(HWND hwnd, HANDLE hRgn);
 732         [DllImport("user32")] public static extern int GetWindowText(HWND hwnd, StringBuilder lpString, int cch);
 733         [DllImport("user32")] public static extern int GetWindowTextLength(HWND hwnd);
 734         [DllImport("user32")] public static extern int GetWindowThreadProcessId(HWND hwnd, ref int lpdwProcessId);
 735         [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);
 736         [DllImport("user32")] public static extern int HideCaret(HWND hwnd);
 737         [DllImport("user32")] public static extern int HiliteMenuItem(HWND hwnd, HANDLE hMenu, int wIDHiliteItem, int wHilite);
 738         [DllImport("user32")] public static extern int ImpersonateDdeClientWindow(HWND hwndClient, HWND hwndServer);
 739         [DllImport("user32")] public static extern int InSendMessage();
 740         [DllImport("user32")] public static extern int InflateRect(ref RECT lpRect, int x, int y);
 741         [DllImport("user32")] public static extern int InsertMenu(HANDLE hMenu, int nPosition, int wFlags, int wIDNewItem, IntPtr lpNewItem);
 742         [DllImport("user32")] public static extern int InsertMenuItem(HANDLE hMenu, int un, bool b, ref MENUITEMINFO lpcMenuItemInfo);
 743         [DllImport("user32")] public static extern int IntersectRect(ref RECT lpDestRect, ref RECT lpSrc1Rect, ref RECT lpSrc2Rect);
 744         [DllImport("user32")] public static extern int InvalidateRect(HWND hwnd, ref RECT lpRect, int bErase);
 745         [DllImport("user32")] public static extern int InvalidateRgn(HWND hwnd, HANDLE hRgn, int bErase);
 746         [DllImport("user32")] public static extern int InvertRect(HDC hdc, ref RECT lpRect);
 747         [DllImport("user32")] public static extern int IsCharAlpha(Byte cChar);
 748         [DllImport("user32")] public static extern int IsCharAlphaNumeric(Byte cChar);
 749         [DllImport("user32")] public static extern int IsCharLower(Byte cChar);
 750         [DllImport("user32")] public static extern int IsCharUpper(Byte cChar);
 751         [DllImport("user32")] public static extern int IsChild(HWND hwndParent, HWND hwnd);
 752         [DllImport("user32")] public static extern int IsClipboardFormatAvailable(int wFormat);
 753         [DllImport("user32")] public static extern int IsDialogMessage(HANDLE hDlg, ref MSG lpMsg);
 754         [DllImport("user32")] public static extern int IsDlgButtonChecked(HANDLE hDlg, int nIDButton);
 755         [DllImport("user32")] public static extern int IsIconic(HWND hwnd);
 756         [DllImport("user32")] public static extern int IsMenu(HANDLE hMenu);
 757         [DllImport("user32")] public static extern int IsRectEmpty(ref RECT lpRect);
 758         [DllImport("user32")] public static extern int IsWindow(HWND hwnd);
 759         [DllImport("user32")] public static extern int IsWindowEnabled(HWND hwnd);
 760         [DllImport("user32")] public static extern int IsWindowUnicode(HWND hwnd);
 761         [DllImport("user32")] public static extern int IsWindowVisible(HWND hwnd);
 762         [DllImport("user32")] public static extern int IsZoomed(HWND hwnd);
 763         [DllImport("user32")] public static extern int KillTimer(HWND hwnd, int nIDEvent);
 764         [DllImport("user32")] public static extern int LoadAccelerators(HANDLE hInstance, string lpTableName);
 765         [DllImport("user32")] public static extern int LoadBitmap(HANDLE hInstance, string lpBitmapName);
 766         [DllImport("user32")] public static extern int LoadCursor(HANDLE hInstance, string lpCursorName);
 767         [DllImport("user32")] public static extern int LoadCursorFromFile(string lpFileName);
 768         [DllImport("user32")] public static extern int LoadIcon(HANDLE hInstance, string lpIconName);
 769         [DllImport("user32")] public static extern int LoadImage(HANDLE hInst, string lpsz, int un1, int n1, int n2, int un2);
 770         [DllImport("user32")] public static extern int LoadKeyboardLayout(string pwszKLID, int flags);
 771         [DllImport("user32")] public static extern int LoadMenu(HANDLE hInstance, string lpString);
 772         [DllImport("user32")] public static extern int LoadMenuIndirect(int lpMenuTemplate);
 773         [DllImport("user32")] public static extern int LoadString(HANDLE hInstance, int wID, string lpBuffer, int nBufferMax);
 774         [DllImport("user32")] public static extern int LockWindowUpdate(HWND hwndLock);
 775         [DllImport("user32")] public static extern int LookupIconIdFromDirectory(Byte presbits, int fIcon);
 776         [DllImport("user32")] public static extern int LookupIconIdFromDirectoryEx(Byte presbits, int fIcon, int cxDesired, int cyDesired, int Flags);
 777         [DllImport("user32")] public static extern int MapDialogRect(HANDLE hDlg, ref RECT lpRect);
 778         [DllImport("user32")] public static extern int MapVirtualKey(int wCode, int wMapType);
 779         [DllImport("user32")] public static extern int MapVirtualKeyEx(int uCode, int uMapType, int dwhkl);
 780         [DllImport("user32")] public static extern int MapWindowPoints(HWND hwndFrom, HWND hwndTo, POINT [] lppt, int cPoints);
 781         [DllImport("user32")] public static extern int MenuItemFromPoint(HWND hwnd, HANDLE hMenu, POINT ptScreen);
 782         [DllImport("user32")] public static extern int MessageBeep(int wType);
 783         [DllImport("user32")] public static extern int MessageBox(HWND hwnd, string lpText, string lpCaption, int wType);
 784         [DllImport("user32")] public static extern int MessageBoxEx(HWND hwnd, string lpText, string lpCaption, int uType, int wLanguageId);
 785         [DllImport("user32")] public static extern int MessageBoxIndirect(ref MSGBOXPARAMS lpMsgBoxParams);
 786         [DllImport("user32")] public static extern int ModifyMenu(HANDLE hMenu, int nPosition, int wFlags, int wIDNewItem, IntPtr lpString);
 787         [DllImport("user32")] public static extern int MoveWindow(HWND hwnd, int x, int y, int nWidth, int nHeight, int bRepaint);
 788         [DllImport("user32")] public static extern int MsgWaitForMultipleObjects(int nCount, ref int pHandles, int fWaitAll, int dwMilliseconds, int dwWakeMask);
 789         [DllImport("user32")] public static extern int OemKeyScan(int wOemChar);
 790         [DllImport("user32")] public static extern int OemToChar(string lpszSrc, string lpszDst);
 791         [DllImport("user32")] public static extern int OemToCharBuff(string lpszSrc, string lpszDst, int cchDstLength);
 792         [DllImport("user32")] public static extern int OffsetRect(ref RECT lpRect, int x, int y);
 793         [DllImport("user32")] public static extern int OpenClipboard(HWND hwnd);
 794         [DllImport("user32")] public static extern int OpenDesktop(string lpszDesktop, int dwFlags, int fInherit, int dwDesiredAccess);
 795         [DllImport("user32")] public static extern int OpenIcon(HWND hwnd);
 796         [DllImport("user32")] public static extern int OpenInputDesktop(int dwFlags, int fInherit, int dwDesiredAccess);
 797         [DllImport("user32")] public static extern int OpenWindowStation(string lpszWinSta, int fInherit, int dwDesiredAccess);
 798         [DllImport("user32")] public static extern int PackDDElParam(int msg, int uiLo, int uiHi);
 799         [DllImport("user32")] public static extern int PaintDesktop(HDC hdc);
 800         [DllImport("user32")] public static extern int PeekMessage(ref MSG lpMsg, HWND hwnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg);
 801         [DllImport("user32")] public static extern int PostMessage(HWND hwnd, int wMsg, int wParam, int lParam);
 802         [DllImport("user32")] public static extern int PostThreadMessage(int idThread, int msg, int wParam, int lParam);
 803         [DllImport("user32")] public static extern int PtInRect(ref RECT lpRect, int ptX, int ptY);
 804         [DllImport("user32")] public static extern int RedrawWindow(HWND hwnd, ref RECT lprcUpdate, HANDLE hrgnUpdate, int fuRedraw);
 805         [DllImport("user32")] public static extern int RegisterClass(ref WNDCLASS Class);
 806         [DllImport("user32")] public static extern int RegisterClipboardFormat(string lpString);
 807         [DllImport("user32")] public static extern int RegisterHotKey(HWND hwnd, int id, int fsModifiers, int vk);
 808         [DllImport("user32")] public static extern int RegisterWindowMessage(string lpString);
 809         [DllImport("user32")] public static extern int ReleaseCapture();
 810         [DllImport("user32")] public static extern int ReleaseDC(HWND hwnd, HDC hdc);
 811         [DllImport("user32")] public static extern int RemoveMenu(HANDLE hMenu, int nPosition, int wFlags);
 812         [DllImport("user32")] public static extern int RemoveProp(HWND hwnd, string lpString);
 813         [DllImport("user32")] public static extern int ReplyMessage(int lReply);
 814         [DllImport("user32")] public static extern int ReuseDDElParam(int lParam, int msgIn, int msgOut, int uiLo, int uiHi);
 815         [DllImport("user32")] public static extern int ScreenToClient(HWND hwnd, ref POINT lpPoint);
 816         [DllImport("user32")] public static extern int ScrollDC(HDC hdc, int dx, int dy, ref RECT lprcScroll, ref RECT lprcClip, HANDLE hrgnUpdate, ref RECT lprcUpdate);
 817         [DllImport("user32")] public static extern int ScrollWindow(HWND hwnd, int XAmount, int YAmount, ref RECT lpRect, ref RECT lpClipRect);
 818         [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);
 819         [DllImport("user32")] public static extern int SendDlgItemMessage(HANDLE hDlg, int nIDDlgItem, int wMsg, int wParam, int lParam);
 820         [DllImport("user32")] public static extern int SendMessage(HWND hwnd, int wMsg, int wParam, IntPtr lParam);
 821         [DllImport("user32")] public static extern int SendMessageCallback(HWND hwnd, int msg, int wParam, int lParam, ref int lpResultCallBack, int dwData);
 822         [DllImport("user32")] public static extern int SendMessageTimeout(HWND hwnd, int msg, int wParam, int lParam, int fuFlags, int uTimeout, ref int lpdwResult);
 823         [DllImport("user32")] public static extern int SendNotifyMessage(HWND hwnd, int msg, int wParam, int lParam);
 824         [DllImport("user32")] public static extern int SetActiveWindow(HWND hwnd);
 825         [DllImport("user32")] public static extern int SetCapture(HWND hwnd);
 826         [DllImport("user32")] public static extern int SetCaretBlinkTime(int wMSeconds);
 827         [DllImport("user32")] public static extern int SetCaretPos(int x, int y);
 828         [DllImport("user32")] public static extern int SetClassLong(HWND hwnd, int nIndex, int dwNewLong);
 829         [DllImport("user32")] public static extern int SetClassWord(HWND hwnd, int nIndex, int wNewWord);
 830         [DllImport("user32")] public static extern int SetClipboardData(int wFormat, HANDLE hMem);
 831         [DllImport("user32")] public static extern int SetClipboardViewer(HWND hwnd);
 832         [DllImport("user32")] public static extern int SetCursor(HANDLE hCursor);
 833         [DllImport("user32")] public static extern int SetCursorPos(int x, int y);
 834         [DllImport("user32")] public static extern int SetDlgItemInt(HANDLE hDlg, int nIDDlgItem, int wValue, int bSigned);
 835         [DllImport("user32")] public static extern int SetDlgItemText(HANDLE hDlg, int nIDDlgItem, string lpString);
 836         [DllImport("user32")] public static extern int SetDoubleClickTime(int wCount);
 837         [DllImport("user32")] public static extern int SetFocus(HWND hwnd);
 838         [DllImport("user32")] public static extern int SetForegroundWindow(HWND hwnd);
 839         [DllImport("user32")] public static extern int SetKeyboardState(Byte lppbKeyState);
 840         [DllImport("user32")] public static extern int SetMenu(HWND hwnd, HANDLE hMenu);
 841         [DllImport("user32")] public static extern int SetMenuContextHelpId(HANDLE hMenu, int dw);
 842         [DllImport("user32")] public static extern int SetMenuDefaultItem(HANDLE hMenu, int uItem, int fByPos);
 843         [DllImport("user32")] public static extern int SetMenuItemBitmaps(HANDLE hMenu, int nPosition, int wFlags, HANDLE hBitmapUnchecked, HANDLE hBitmapChecked);
 844         [DllImport("user32")] public static extern int SetMenuItemInfo(HANDLE hMenu, int un, bool b, ref MENUITEMINFO lpcMenuItemInfo);
 845         [DllImport("user32")] public static extern int SetMessageExtraInfo(int lParam);
 846         [DllImport("user32")] public static extern int SetMessageQueue(int cMessagesMax);
 847         [DllImport("user32")] public static extern int SetParent(HWND hwndChild, HWND hwndNewParent);
 848         [DllImport("user32")] public static extern int SetProcessWindowStation(HANDLE hWinSta);
 849         [DllImport("user32")] public static extern int SetProp(HWND hwnd, string lpString, HANDLE hData);
 850         [DllImport("user32")] public static extern int SetRect(ref RECT lpRect, int X1, int Y1, int X2, int Y2);
 851         [DllImport("user32")] public static extern int SetRectEmpty(ref RECT lpRect);
 852         [DllImport("user32")] public static extern int SetScrollInfo(HWND hwnd, int n, ref SCROLLINFO lpcScrollInfo, bool redraw);
 853         [DllImport("user32")] public static extern int SetScrollPos(HWND hwnd, int nBar, int nPos, int bRedraw);
 854         [DllImport("user32")] public static extern int SetScrollRange(HWND hwnd, int nBar, int nMinPos, int nMaxPos, int bRedraw);
 855         [DllImport("user32")] public static extern int SetSysColors(int nChanges, ref int lpSysColor, ref int lpColorValues);
 856         [DllImport("user32")] public static extern int SetSystemCursor(HANDLE hcur, int id);
 857         [DllImport("user32")] public static extern int SetThreadDesktop(HANDLE hDesktop);
 858         [DllImport("user32")] public static extern int SetTimer(HWND hwnd, int nIDEvent, int uElapse, ref int lpTimerFunc);
 859         [DllImport("user32")] public static extern int SetUserObjectInformation(HANDLE hObj, int nIndex, IntPtr pvInfo, int nLength);
 860         [DllImport("user32")] public static extern int SetUserObjectSecurity(HANDLE hObj, ref int pSIRequested, ref SECURITY_DESCRIPTOR pSd);
 861         [DllImport("user32")] public static extern int SetWindowContextHelpId(HWND hwnd, int dw);
 862         [DllImport("user32")] public static extern int SetWindowLong(HWND hwnd, int nIndex, int dwNewLong);
 863         [DllImport("user32")] public static extern int SetWindowPlacement(HWND hwnd, ref WINDOWPLACEMENT lpwndpl);
 864         [DllImport("user32")] public static extern int SetWindowPos(HWND hwnd, HWND hwndInsertAfter, int x, int y, int cx, int cy, int wFlags);
 865         [DllImport("user32")] public static extern int SetWindowRgn(HWND hwnd, HANDLE hRgn, int bRedraw);
 866         [DllImport("user32")] public static extern int SetWindowText(HWND hwnd, string lpString);
 867         [DllImport("user32")] public static extern int SetWindowWord(HWND hwnd, int nIndex, int wNewWord);
 868         [DllImport("user32")] public static extern int SetWindowsHook(int nFilterType, ref int pfnFilterProc);
 869         [DllImport("user32")] public static extern int SetWindowsHookEx(int idHook, ref int lpfn, HANDLE hmod, int dwThreadId);
 870         [DllImport("user32")] public static extern int ShowCaret(HWND hwnd);
 871         [DllImport("user32")] public static extern int ShowCursor(int bShow);
 872         [DllImport("user32")] public static extern int ShowOwnedPopups(HWND hwnd, int fShow);
 873         [DllImport("user32")] public static extern int ShowScrollBar(HWND hwnd, int wBar, int bShow);
 874         [DllImport("user32")] public static extern int ShowWindow(HWND hwnd, int nCmdShow);
 875         [DllImport("user32")] public static extern int ShowWindowAsync(HWND hwnd, int nCmdShow);
 876         [DllImport("user32")] public static extern int SubtractRect(ref RECT lprcDst, ref RECT lprcSrc1, ref RECT lprcSrc2);
 877         [DllImport("user32")] public static extern int SwapMouseButton(int bSwap);
 878         [DllImport("user32")] public static extern int SwitchDesktop(HANDLE hDesktop);
 879         [DllImport("user32")] public static extern int SystemParametersInfo(int uAction, int uParam, ref IntPtr lpvParam, int fuWinIni);
 880         [DllImport("user32")] public static extern int TabbedTextOut(HDC hdc, int x, int y, string lpString, int nCount, int nTabPositions, ref int lpnTabStopPositions, int nTabOrigin);
 881         [DllImport("user32")] public static extern int ToAscii(int uVirtKey, int uScanCode, Byte lpbKeyState, ref int lpwTransKey, int fuState);
 882         [DllImport("user32")] public static extern int ToAsciiEx(int uVirtKey, int uScanCode, Byte lpKeyState, short lpChar, int uFlags, int dwhkl);
 883         [DllImport("user32")] public static extern int ToUnicode(int wVirtKey, int wScanCode, Byte lpKeyState, string pwszBuff, int cchBuff, int wFlags);
 884         [DllImport("user32")] public static extern int TrackPopupMenu(HANDLE hMenu, int wFlags, int x, int y, int nReserved, HWND hwnd, ref RECT lprc);
 885         [DllImport("user32")] public static extern int TrackPopupMenuEx(HANDLE hMenu, int un, int n1, int n2, HWND hwnd, ref TPMPARAMS lpTPMParams);
 886         [DllImport("user32")] public static extern int TranslateAccelerator(HWND hwnd, HANDLE hAccTable, ref MSG lpMsg);
 887         [DllImport("user32")] public static extern int TranslateMDISysAccel(HWND hwndClient, ref MSG lpMsg);
 888         [DllImport("user32")] public static extern int TranslateMessage(ref MSG lpMsg);
 889         [DllImport("user32")] public static extern int UnhookWindowsHook(int nCode, ref int pfnFilterProc);
 890         [DllImport("user32")] public static extern int UnhookWindowsHookEx(HANDLE hHook);
 891         [DllImport("user32")] public static extern int UnionRect(ref RECT lpDestRect, ref RECT lpSrc1Rect, ref RECT lpSrc2Rect);
 892         [DllImport("user32")] public static extern int UnloadKeyboardLayout(HANDLE hKL);
 893         [DllImport("user32")] public static extern int UnpackDDElParam(int msg, int lParam, ref int puiLo, ref int puiHi);
 894         [DllImport("user32")] public static extern int UnregisterClass(string lpClassName, HANDLE hInstance);
 895         [DllImport("user32")] public static extern int UnregisterHotKey(HWND hwnd, int id);
 896         [DllImport("user32")] public static extern int UpdateWindow(HWND hwnd);
 897         [DllImport("user32")] public static extern int ValidateRect(HWND hwnd, ref RECT lpRect);
 898         [DllImport("user32")] public static extern int ValidateRgn(HWND hwnd, HANDLE hRgn);
 899         [DllImport("user32")] public static extern int WaitForInputIdle(HANDLE hProcess, int dwMilliseconds);
 900         [DllImport("user32")] public static extern int WaitMessage();
 901         [DllImport("user32")] public static extern int WinHelp(HWND hwnd, string lpHelpFile, int wCommand, int dwData);
 902         [DllImport("user32")] public static extern int WindowFromDC(HDC hdc);
 903         [DllImport("user32")] public static extern int WindowFromPoint(int xPoint, int yPoint);
 904         [DllImport("user32")] public static extern short CascadeWindows(HWND hwndParent, int wHow, ref RECT lpRect, int cKids, ref int lpkids);
 905         [DllImport("user32")] public static extern short GetAsyncKeyState(int vKey);
 906         [DllImport("user32")] public static extern short GetKeyState(int nVirtKey);
 907         [DllImport("user32")] public static extern short GetWindowWord(HWND hwnd, int nIndex);
 908         [DllImport("user32")] public static extern short RegisterClassEx(ref WNDCLASSEX pcWndClassEx);
 909         [DllImport("user32")] public static extern short TileWindows(HWND hwndParent, int wHow, ref RECT lpRect, int cKids, ref int lpKids);
 910         [DllImport("user32")] public static extern short VkKeyScan(Byte cChar);
 911         [DllImport("user32")] public static extern short VkKeyScanEx(Byte ch, int dwhkl);
 912         [DllImport("user32")] public static extern string CharLower(string lpsz);
 913         [DllImport("user32")] public static extern string CharNext(string lpsz);
 914         [DllImport("user32")] public static extern string CharPrev(string lpszStart, string lpszCurrent);
 915         [DllImport("user32")] public static extern string CharUpper(string lpsz);
 916         [DllImport("user32")] public static extern void PostQuitMessage(int nExitCode);
 917         [DllImport("user32")] public static extern void keybd_event(Byte bVk, Byte bScan, int dwFlags, int dwExtraInfo);
 918         [DllImport("user32")] public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo);
 919         [DllImport("user32")] public static extern void SetDebugErrorLevel(int dwLevel);
 920         [DllImport("user32")] public static extern void SetLastErrorEx(int dwErrCode, int dwType);
 921 
 922         public const int APPCLASS_MASK = 0xF;
 923         public const int APPCLASS_MONITOR = 0x1;
 924         public const int APPCLASS_STANDARD = 0x0;
 925         public const int APPCMD_CLIENTONLY = 0x10;
 926         public const int APPCMD_FILTERINITS = 0x20;
 927         public const int APPCMD_MASK = 0xFF0;
 928         public const int BDR_INNER = 0xC;
 929         public const int BDR_OUTER = 0x3;
 930         public const int BDR_RAISED = 0x5;
 931         public const int BDR_RAISEDINNER = 0x4;
 932         public const int BDR_RAISEDOUTER = 0x1;
 933         public const int BDR_SUNKEN = 0xA;
 934         public const int BDR_SUNKENINNER = 0x8;
 935         public const int BDR_SUNKENOUTER = 0x2;
 936         public const int BF_ADJUST = 0x2000; 
 937         public const int BF_BOTTOM = 0x8;
 938         public const int BF_BOTTOMLEFT = (BF_BOTTOM | BF_LEFT);
 939         public const int BF_BOTTOMRIGHT = (BF_BOTTOM | BF_RIGHT);
 940         public const int BF_DIAGONAL = 0x10;
 941         public const int BF_DIAGONAL_ENDBOTTOMLEFT = (BF_DIAGONAL | BF_BOTTOM | BF_LEFT);
 942         public const int BF_DIAGONAL_ENDBOTTOMRIGHT = (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT);
 943         public const int BF_DIAGONAL_ENDTOPLEFT = (BF_DIAGONAL | BF_TOP | BF_LEFT);
 944         public const int BF_DIAGONAL_ENDTOPRIGHT = (BF_DIAGONAL | BF_TOP | BF_RIGHT);
 945         public const int BF_FLAT = 0x4000; 
 946         public const int BF_LEFT = 0x1;
 947         public const int BF_MIDDLE = 0x800; 
 948         public const int BF_MONO = 0x8000; 
 949         public const int BF_RECT = (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM);
 950         public const int BF_RIGHT = 0x4;
 951         public const int BF_SOFT = 0x1000; 
 952         public const int BF_TOP = 0x2;
 953         public const int BF_TOPLEFT = (BF_TOP | BF_LEFT);
 954         public const int BF_TOPRIGHT = (BF_TOP | BF_RIGHT);
 955         public const int BIF_BROWSEFORCOMPUTER = 4096; 
 956         public const int BIF_BROWSEFORPRINTER = 8192; 
 957         public const int BIF_BROWSEINCLUDEFILES = 16384; 
 958         public const int BIF_BROWSEINCLUDEURLS = 128; 
 959         public const int BIF_DONTGOBELOWDOMAIN = 2; 
 960         public const int BIF_EDITBOX = 16; 
 961         public const int BIF_RETURNFSANCESTORS = 8;
 962         public const int BIF_RETURNONLYFSDIRS = 1; 
 963         public const int BIF_SHAREABLE = 32768; 
 964         public const int BIF_STATUSTEXT = 4; 
 965         public const int BIF_USENEWUI = 64; 
 966         public const int BIF_VALIDATE = 32; 
 967         public const int BM_GETCHECK = 0xF0;
 968         public const int BM_GETSTATE = 0xF2;
 969         public const int BM_SETCHECK = 0xF1;
 970         public const int BM_SETSTATE = 0xF3;
 971         public const int BM_SETSTYLE = 0xF4;
 972         public const int BN_CLICKED = 0;
 973         public const int BN_DISABLE = 4;
 974         public const int BN_DOUBLECLICKED = 5;
 975         public const int BN_HILITE = 2;
 976         public const int BN_PAINT = 1;
 977         public const int BN_UNHILITE = 3;
 978         public const int BS_3STATE = 0x5;
 979         public const int BS_AUTO3STATE = 0x6;
 980         public const int BS_AUTOCHECKBOX = 0x3;
 981         public const int BS_AUTORADIOBUTTON = 0x9;
 982         public const int BS_CHECKBOX = 0x2;
 983         public const int BS_DEFPUSHBUTTON = 0x1;
 984         public const int BS_GROUPBOX = 0x7;
 985         public const int BS_LEFTTEXT = 0x20;
 986         public const int BS_OWNERDRAW = 0xB;
 987         public const int BS_PUSHBUTTON = 0x0;
 988         public const int BS_RADIOBUTTON = 0x4;
 989         public const int BS_USERBUTTON = 0x8;
 990         public const int CADV_LATEACK = 0xFFFF;
 991         public const int CBF_FAIL_ADVISES = 0x4000;
 992         public const int CBF_FAIL_ALLSVRXACTIONS = 0x3F000;
 993         public const int CBF_FAIL_CONNECTIONS = 0x2000;
 994         public const int CBF_FAIL_EXECUTES = 0x8000;
 995         public const int CBF_FAIL_POKES = 0x10000;
 996         public const int CBF_FAIL_REQUESTS = 0x20000;
 997         public const int CBF_FAIL_SELFCONNECTIONS = 0x1000;
 998         public const int CBF_SKIP_ALLNOTIFICATIONS = 0x3C0000;
 999         public const int CBF_SKIP_CONNECT_CONFIRMS = 0x40000;
1000         public const int CBF_SKIP_DISCONNECTS = 0x200000;
1001         public const int CBF_SKIP_REGISTRATIONS = 0x80000;
1002         public const int CBF_SKIP_UNREGISTRATIONS = 0x100000;
1003         public const int CBN_CLOSEUP = 8;
1004         public const int CBN_DBLCLK = 2;
1005         public const int CBN_DROPDOWN = 7;
1006         public const int CBN_EDITCHANGE = 5;
1007         public const int CBN_EDITUPDATE = 6;
1008         public const int CBN_ERRSPACE = (-1);
1009         public const int CBN_KILLFOCUS = 4;
1010         public const int CBN_SELCHANGE = 1;
1011         public const int CBN_SELENDCANCEL = 10;
1012         public const int CBN_SELENDOK = 9;
1013         public const int CBN_SETFOCUS = 3;
1014         public const int CBR_BLOCK = 0xFFFF;
1015         public const int CBS_AUTOHSCROLL = 0x40;
1016         public const int CBS_DISABLENOSCROLL = 0x800;
1017         public const int CBS_DROPDOWN = 0x2;
1018         public const int CBS_DROPDOWNLIST = 0x3;
1019         public const int CBS_HASSTRINGS = 0x200;
1020         public const int CBS_NOINTEGRALHEIGHT = 0x400;
1021         public const int CBS_OEMCONVERT = 0x80;
1022         public const int CBS_OWNERDRAWFIXED = 0x10;
1023         public const int CBS_OWNERDRAWVARIABLE = 0x20;
1024         public const int CBS_SIMPLE = 0x1;
1025         public const int CBS_SORT = 0x100;
1026         public const int CB_ADDSTRING = 0x143;
1027         public const int CB_DELETESTRING = 0x144;
1028         public const int CB_DIR = 0x145;
1029         public const int CB_ERR = (-1);
1030         public const int CB_ERRSPACE = (-2);
1031         public const int CB_FINDSTRING = 0x14C;
1032         public const int CB_FINDSTRINGEXACT = 0x158;
1033         public const int CB_GETCOUNT = 0x146;
1034         public const int CB_GETCURSEL = 0x147;
1035         public const int CB_GETDROPPEDCONTROLRECT = 0x152;
1036         public const int CB_GETDROPPEDSTATE = 0x157;
1037         public const int CB_GETEDITSEL = 0x140;
1038         public const int CB_GETEXTENDEDUI = 0x156;
1039         public const int CB_GETITEMDATA = 0x150;
1040         public const int CB_GETITEMHEIGHT = 0x154;
1041         public const int CB_GETLBTEXT = 0x148;
1042         public const int CB_GETLBTEXTLEN = 0x149;
1043         public const int CB_GETLOCALE = 0x15A;
1044         public const int CB_INSERTSTRING = 0x14A;
1045         public const int CB_LIMITTEXT = 0x141;
1046         public const int CB_MSGMAX = 0x15B;
1047         public const int CB_OKAY = 0;
1048         public const int CB_RESETCONTENT = 0x14B;
1049         public const int CB_SELECTSTRING = 0x14D;
1050         public const int CB_SETCURSEL = 0x14E;
1051         public const int CB_SETEDITSEL = 0x142;
1052         public const int CB_SETEXTENDEDUI = 0x155;
1053         public const int CB_SETITEMDATA = 0x151;
1054         public const int CB_SETITEMHEIGHT = 0x153;
1055         public const int CB_SETLOCALE = 0x159;
1056         public const int CB_SHOWDROPDOWN = 0x14F;
1057         public const int CF_BITMAP = 2;
1058         public const int CF_DIB = 8;
1059         public const int CF_DIF = 5;
1060         public const int CF_DSPBITMAP = 0x82;
1061         public const int CF_DSPENHMETAFILE = 0x8E;
1062         public const int CF_DSPMETAFILEPICT = 0x83;
1063         public const int CF_DSPTEXT = 0x81;
1064         public const int CF_ENHMETAFILE = 14;
1065         public const int CF_GDIOBJFIRST = 0x300;
1066         public const int CF_GDIOBJLAST = 0x3FF;
1067         public const int CF_METAFILEPICT = 3;
1068         public const int CF_OEMTEXT = 7;
1069         public const int CF_OWNERDISPLAY = 0x80;
1070         public const int CF_PALETTE = 9;
1071         public const int CF_PENDATA = 10;
1072         public const int CF_PRIVATEFIRST = 0x200;
1073         public const int CF_PRIVATELAST = 0x2FF;
1074         public const int CF_RIFF = 11;
1075         public const int CF_SYLK = 4;
1076         public const int CF_TEXT = 1;
1077         public const int CF_TIFF = 6;
1078         public const int CF_UNICODETEXT = 13;
1079         public const int CF_WAVE = 12;
1080         public const int CN_EVENT = 0x4;
1081         public const int CN_RECEIVE = 0x1;
1082         public const int CN_TRANSMIT = 0x2;
1083         public const int COLOR_ACTIVEBORDER = 10;
1084         public const int COLOR_ACTIVECAPTION = 2;
1085         public const int COLOR_APPWORKSPACE = 12;
1086         public const int COLOR_BACKGROUND = 1;
1087         public const int COLOR_BTNFACE = 15;
1088         public const int COLOR_BTNHIGHLIGHT = 20;
1089         public const int COLOR_BTNSHADOW = 16;
1090         public const int COLOR_BTNTEXT = 18;
1091         public const int COLOR_CAPTIONTEXT = 9;
1092         public const int COLOR_GRAYTEXT = 17;
1093         public const int COLOR_HIGHLIGHT = 13;
1094         public const int COLOR_HIGHLIGHTTEXT = 14;
1095         public const int COLOR_INACTIVEBORDER = 11;
1096         public const int COLOR_INACTIVECAPTION = 3;
1097         public const int COLOR_INACTIVECAPTIONTEXT = 19;
1098         public const int COLOR_MENU = 4;
1099         public const int COLOR_MENUTEXT = 7;
1100         public const int COLOR_SCROLLBAR = 0;
1101         public const int COLOR_WINDOW = 5;
1102         public const int COLOR_WINDOWFRAME = 6;
1103         public const int COLOR_WINDOWTEXT = 8;
1104         public const int CP_WINANSI = 1004; 
1105         public const int CP_WINUNICODE = 1200;
1106         public const int CS_BYTEALIGNCLIENT = 0x1000;
1107         public const int CS_BYTEALIGNWINDOW = 0x2000;
1108         public const int CS_CLASSDC = 0x40;
1109         public const int CS_DBLCLKS = 0x8;
1110         public const int CS_HREDRAW = 0x2;
1111         public const int CS_KEYCVTWINDOW = 0x4;
1112         public const int CS_NOCLOSE = 0x200;
1113         public const int CS_NOKEYCVT = 0x100;
1114         public const int CS_OWNDC = 0x20;
1115         public const int CS_PARENTDC = 0x80;
1116         public const int CS_PUBLICCLASS = 0x4000;
1117         public const int CS_SAVEBITS = 0x800;
1118         public const int CS_VREDRAW = 0x1;
1119         public const int CTLCOLOR_BTN = 3;
1120         public const int CTLCOLOR_DLG = 4;
1121         public const int CTLCOLOR_EDIT = 1;
1122         public const int CTLCOLOR_LISTBOX = 2;
1123         public const int CTLCOLOR_MAX = 8; 
1124         public const int CTLCOLOR_MSGBOX = 0;
1125         public const int CTLCOLOR_SCROLLBAR = 5;
1126         public const int CTLCOLOR_STATIC = 6;
1127         public const int CW_USEDEFAULT = unchecked((int)0x80000000);
1128         public const int DCX_CACHE = 0x2;
1129         public const int DCX_CLIPCHILDREN = 0x8;
1130         public const int DCX_CLIPSIBLINGS = 0x10;
1131         public const int DCX_EXCLUDERGN = 0x40;
1132         public const int DCX_EXCLUDEUPDATE = 0x100;
1133         public const int DCX_INTERSECTRGN = 0x80;
1134         public const int DCX_INTERSECTUPDATE = 0x200;
1135         public const int DCX_LOCKWINDOWUPDATE = 0x400;
1136         public const int DCX_NORECOMPUTE = 0x100000;
1137         public const int DCX_NORESETATTRS = 0x4;
1138         public const int DCX_PARENTCLIP = 0x20;
1139         public const int DCX_VALIDATE = 0x200000;
1140         public const int DCX_WINDOW = 0x1;
1141         public const int DC_HASDEFID = 0x534; 
1142         public const int DDE_FACK = 0x8000;
1143         public const int DDE_FACKREQ = 0x8000;
1144         public const int DDE_FACKRESERVED = (~ (DDE_FACK | DDE_FBUSY | DDE_FAPPSTATUS));
1145         public const int DDE_FADVRESERVED = (~ (DDE_FACKREQ | DDE_FDEFERUPD));
1146         public const int DDE_FAPPSTATUS = 0xFF;
1147         public const int DDE_FBUSY = 0x4000;
1148         public const int DDE_FDATRESERVED = (~ (DDE_FACKREQ | DDE_FRELEASE | DDE_FREQUESTED));
1149         public const int DDE_FDEFERUPD = 0x4000;
1150         public const int DDE_FNOTPROCESSED = 0x0;
1151         public const int DDE_FPOKRESERVED = (~ (DDE_FRELEASE));
1152         public const int DDE_FRELEASE = 0x2000;
1153         public const int DDE_FREQUESTED = 0x1000;
1154         public const int DDL_ARCHIVE = 0x20;
1155         public const int DDL_DIRECTORY = 0x10;
1156         public const int DDL_DRIVES = 0x4000;
1157         public const int DDL_EXCLUSIVE = 0x8000;
1158         public const int DDL_HIDDEN = 0x2;
1159         public const int DDL_POSTMSGS = 0x2000;
1160         public const int DDL_READONLY = 0x1;
1161         public const int DDL_READWRITE = 0x0;
1162         public const int DDL_SYSTEM = 0x4;
1163         public const int DESKTOP_CREATEMENU = 0x4;
1164         public const int DESKTOP_CREATEWINDOW = 0x2;
1165         public const int DESKTOP_ENUMERATE = 0x40;
1166         public const int DESKTOP_HOOKCONTROL = 0x8;
1167         public const int DESKTOP_JOURNALPLAYBACK = 0x20;
1168         public const int DESKTOP_JOURNALRECORD = 0x10;
1169         public const int DESKTOP_READOBJECTS = 0x1;
1170         public const int DESKTOP_WRITEOBJECTS = 0x80;
1171         public const int DLGC_BUTTON = 0x2000; 
1172         public const int DLGC_DEFPUSHBUTTON = 0x10; 
1173         public const int DLGC_HASSETSEL = 0x8; 
1174         public const int DLGC_RADIOBUTTON = 0x40; 
1175         public const int DLGC_STATIC = 0x100; 
1176         public const int DLGC_UNDEFPUSHBUTTON = 0x20; 
1177         public const int DLGC_WANTALLKEYS = 0x4; 
1178         public const int DLGC_WANTARROWS = 0x1; 
1179         public const int DLGC_WANTCHARS = 0x80; 
1180         public const int DLGC_WANTMESSAGE = 0x4; 
1181         public const int DLGC_WANTTAB = 0x2; 
1182         public const int DLGWINDOWEXTRA = 30; 
1183         public const int DMLERR_ADVACKTIMEOUT = 0x4000;
1184         public const int DMLERR_BUSY = 0x4001;
1185         public const int DMLERR_DATAACKTIMEOUT = 0x4002;
1186         public const int DMLERR_DLL_NOT_INITIALIZED = 0x4003;
1187         public const int DMLERR_DLL_USAGE = 0x4004;
1188         public const int DMLERR_EXECACKTIMEOUT = 0x4005;
1189         public const int DMLERR_FIRST = 0x4000;
1190         public const int DMLERR_INVALIDPARAMETER = 0x4006;
1191         public const int DMLERR_LAST = 0x4011;
1192         public const int DMLERR_LOW_MEMORY = 0x4007;
1193         public const int DMLERR_MEMORY_ERROR = 0x4008;
1194         public const int DMLERR_NOTPROCESSED = 0x4009;
1195         public const int DMLERR_NO_CONV_ESTABLISHED = 0x400A;
1196         public const int DMLERR_NO_ERROR = 0; 
1197         public const int DMLERR_POKEACKTIMEOUT = 0x400B;
1198         public const int DMLERR_POSTMSG_FAILED = 0x400C;
1199         public const int DMLERR_REENTRANCY = 0x400D;
1200         public const int DMLERR_SERVER_DIED = 0x400E;
1201         public const int DMLERR_SYS_ERROR = 0x400F;
1202         public const int DMLERR_UNADVACKTIMEOUT = 0x4010;
1203         public const int DMLERR_UNFOUND_QUEUE_ID = 0x4011;
1204         public const int DM_GETDEFID = WM_USER + 0;
1205         public const int DM_SETDEFID = WM_USER + 1;
1206         public const int DNS_FILTEROFF = 0x8;
1207         public const int DNS_FILTERON = 0x4;
1208         public const int DNS_REGISTER = 0x1;
1209         public const int DNS_UNREGISTER = 0x2;
1210         public const int DS_ABSALIGN = 0x1;
1211         public const int DS_LOCALEDIT = 0x20; 
1212         public const int DS_MODALFRAME = 0x80; 
1213         public const int DS_NOIDLEMSG = 0x100; 
1214         public const int DS_SETFONT = 0x40; 
1215         public const int DS_SETFOREGROUND = 0x200; 
1216         public const int DS_SYSMODAL = 0x2;
1217         public const int DT_BOTTOM = 0x8;
1218         public const int DT_CALCRECT = 0x400;
1219         public const int DT_CENTER = 0x1;
1220         public const int DT_EDITCONTROL = 0x2000;
1221         public const int DT_END_ELLIPSIS = 0x8000;
1222         public const int DT_EXPANDTABS = 0x40;
1223         public const int DT_EXTERNALLEADING = 0x200;
1224         public const int DT_INTERNAL = 0x1000;
1225         public const int DT_LEFT = 0x0;
1226         public const int DT_MODIFYSTRING = 0x10000;
1227         public const int DT_NOCLIP = 0x100;
1228         public const int DT_NOPREFIX = 0x800;
1229         public const int DT_PATH_ELLIPSIS = 0x4000;
1230         public const int DT_RIGHT = 0x2;
1231         public const int DT_RTLREADING = 0x20000;
1232         public const int DT_SINGLELINE = 0x20;
1233         public const int DT_TABSTOP = 0x80;
1234         public const int DT_TOP = 0x0;
1235         public const int DT_VCENTER = 0x4;
1236         public const int DT_WORDBREAK = 0x10;
1237         public const int DT_WORD_ELLIPSIS = 0x40000;
1238         public const int DWL_DLGPROC = 4;
1239         public const int DWL_MSGRESULT = 0;
1240         public const int DWL_USER = 8;
1241         public const int EC_DISABLE = ST_BLOCKED;
1242         public const int EC_ENABLEALL = 0;
1243         public const int EC_ENABLEONE = ST_BLOCKNEXT;
1244         public const int EC_QUERYWAITING = 2;
1245         public const int EDGE_BUMP = (BDR_RAISEDOUTER | BDR_SUNKENINNER);
1246         public const int EDGE_ETCHED = (BDR_SUNKENOUTER | BDR_RAISEDINNER);
1247         public const int EDGE_RAISED = (BDR_RAISEDOUTER | BDR_RAISEDINNER);
1248         public const int EDGE_SUNKEN = (BDR_SUNKENOUTER | BDR_SUNKENINNER);
1249         public const int EM_CANPASTE = 0x432;
1250         public const int EM_CANREDO = 0x455;
1251         public const int EM_CANUNDO = 0xC6;
1252         public const int EM_CHARFROMPOS = 0x427;
1253         public const int EM_DISPLAYBAND = 0x433;
1254         public const int EM_EMPTYUNDOBUFFER = 0xCD;
1255         public const int EM_EXGETSEL = 0x434;
1256         public const int EM_EXLIMITTEXT = 0x435;
1257         public const int EM_EXLINEFROMCHAR = 0x436;
1258         public const int EM_EXSETSEL = 0x437;
1259         public const int EM_FINDTEXT = 0x438;
1260         public const int EM_FINDTEXTEX = 0x44F;
1261         public const int EM_FINDWORDBREAK = 0x44C;
1262         public const int EM_FMTLINES = 0xC8;
1263         public const int EM_FORMATRANGE = 0x439;
1264         public const int EM_GETCHARFORMAT = 0x43A;
1265         public const int EM_GETEVENTMASK = 0x43B;
1266         public const int EM_GETFIRSTVISIBLELINE = 0xCE;
1267         public const int EM_GETLIMITTEXT = 0x425;
1268         public const int EM_GETLINE = 0xC4;
1269         public const int EM_GETLINECOUNT = 0xBA;
1270         public const int EM_GETMODIFY = 0xB8;
1271         public const int EM_GETOLEINTERFACE = 0x43C;
1272         public const int EM_GETOPTIONS = 0x44E;
1273         public const int EM_GETPARAFORMAT = 0x43D;
1274         public const int EM_GETPASSWORDCHAR = 0xD2;
1275         public const int EM_GETRECT = 0xB2;
1276         public const int EM_GETREDONAME = 0x457;
1277         public const int EM_GETSEL = 0xB0;
1278         public const int EM_GETSELTEXT = 0x43E;
1279         public const int EM_GETTEXTMODE = 0x45A;
1280         public const int EM_GETTEXTRANGE = 0x44B;
1281         public const int EM_GETTHUMB = 0xBE;
1282         public const int EM_GETUNDONAME = 0x456;
1283         public const int EM_GETWORDBREAKPROC = 0xD1;
1284         public const int EM_HIDESELECTION = 0x43F;
1285         public const int EM_LIMITTEXT = 0xC5;
1286         public const int EM_LINEFROMCHAR = 0xC9;
1287         public const int EM_LINEINDEX = 0xBB;
1288         public const int EM_LINELENGTH = 0xC1;
1289         public const int EM_LINESCROLL = 0xB6;
1290         public const int EM_PASTESPECIAL = 0x440;
1291         public const int EM_POSFROMCHAR = 0x426;
1292         public const int EM_REDO = 0x454;
1293         public const int EM_REPLACESEL = 0xC2;
1294         public const int EM_REQUESTRESIZE = 0x441;
1295         public const int EM_SCROLL = 0xB5;
1296         public const int EM_SCROLLCARET = 0xB7;
1297         public const int EM_SELECTIONTYPE = 0x442;
1298         public const int EM_SETBKGNDCOLOR = 0x443;
1299         public const int EM_SETCHARFORMAT = 0x444;
1300         public const int EM_SETEVENTMASK = 0x445;
1301         public const int EM_SETMODIFY = 0xB9;
1302         public const int EM_SETOLECALLBACK = 0x446;
1303         public const int EM_SETOPTIONS = 0x44D;
1304         public const int EM_SETPARAFORMAT = 0x447;
1305         public const int EM_SETPASSWORDCHAR = 0xCC;
1306         public const int EM_SETREADONLY = 0xCF;
1307         public const int EM_SETRECT = 0xB3;
1308         public const int EM_SETRECTNP = 0xB4;
1309         public const int EM_SETSEL = 0xB1;
1310         public const int EM_SETTABSTOPS = 0xCB;
1311         public const int EM_SETTARGETDEVICE = 0x448;
1312         public const int EM_SETTEXTMODE = 0x459;
1313         public const int EM_SETUNDOLIMIT = 0x452;
1314         public const int EM_SETWORDBREAKPROC = 0xD0;
1315         public const int EM_STOPGROUPTYPING = 0x458;
1316         public const int EM_STREAMIN = 0x449;
1317         public const int EM_STREAMOUT = 0x44A;
1318         public const int EM_UNDO = 0xC7;
1319         public const int EN_CHANGE = 0x300;
1320         public const int EN_ERRSPACE = 0x500;
1321         public const int EN_HSCROLL = 0x601;
1322         public const int EN_KILLFOCUS = 0x200;
1323         public const int EN_MAXTEXT = 0x501;
1324         public const int EN_SETFOCUS = 0x100;
1325         public const int EN_UPDATE = 0x400;
1326         public const int EN_VSCROLL = 0x602;
1327         public const int ESB_DISABLE_BOTH = 0x3;
1328         public const int ESB_DISABLE_DOWN = 0x2;
1329         public const int ESB_DISABLE_LEFT = 0x1;
1330         public const int ESB_DISABLE_LTUP = ESB_DISABLE_LEFT;
1331         public const int ESB_DISABLE_RIGHT = 0x2;
1332         public const int ESB_DISABLE_RTDN = ESB_DISABLE_RIGHT;
1333         public const int ESB_DISABLE_UP = 0x1;
1334         public const int ESB_ENABLE_BOTH = 0x0;
1335         public const int ES_AUTOHSCROLL = 0x80;
1336         public const int ES_AUTOVSCROLL = 0x40;
1337         public const int ES_CENTER = 0x1;
1338         public const int ES_LEFT = 0x0;
1339         public const int ES_LOWERCASE = 0x10;
1340         public const int ES_MULTILINE = 0x4;
1341         public const int ES_NOHIDESEL = 0x100;
1342         public const int ES_OEMCONVERT = 0x400;
1343         public const int ES_PASSWORD = 0x20;
1344         public const int ES_READONLY = 0x800;
1345         public const int ES_RIGHT = 0x2;
1346         public const int ES_UPPERCASE = 0x8;
1347         public const int ES_WANTRETURN = 0x1000;
1348         public const int EWX_FORCE = 4;
1349         public const int EWX_LOGOFF = 0;
1350         public const int EWX_REBOOT = 2;
1351         public const int EWX_SHUTDOWN = 1;
1352         public const int FALT = 0x10;
1353         public const int FCONTROL = 0x8;
1354         public const int FNOINVERT = 0x2;
1355         public const int FSHIFT = 0x4;
1356         public const int FVIRTKEY = 0x1;
1357         public const int GCL_CBCLSEXTRA = (-20);
1358         public const int GCL_CBWNDEXTRA = (-18);
1359         public const int GCL_HBRBACKGROUND = (-10);
1360         public const int GCL_HCURSOR = (-12);
1361         public const int GCL_HICON = (-14);
1362         public const int GCL_HMODULE = (-16);
1363         public const int GCL_MENUNAME = (-8);
1364         public const int GCL_STYLE = (-26);
1365         public const int GCL_WNDPROC = (-24);
1366         public const int GCW_ATOM = (-32);
1367         public const int GWL_EXSTYLE = (-20);
1368         public const int GWL_HINSTANCE = (-6);
1369         public const int GWL_HWNDPARENT = (-8);
1370         public const int GWL_ID = (-12);
1371         public const int GWL_STYLE = (-16);
1372         public const int GWL_USERDATA = (-21);
1373         public const int GWL_WNDPROC = (-4);
1374         public const int GW_CHILD = 5;
1375         public const int GW_HWNDFIRST = 0;
1376         public const int GW_HWNDLAST = 1;
1377         public const int GW_HWNDNEXT = 2;
1378         public const int GW_HWNDPREV = 3;
1379         public const int GW_MAX = 5;
1380         public const int GW_OWNER = 4;
1381         public const int HCBT_ACTIVATE = 5;
1382         public const int HCBT_CLICKSKIPPED = 6;
1383         public const int HCBT_CREATEWND = 3;
1384         public const int HCBT_DESTROYWND = 4;
1385         public const int HCBT_KEYSKIPPED = 7;
1386         public const int HCBT_MINMAX = 1;
1387         public const int HCBT_MOVESIZE = 0;
1388         public const int HCBT_QS = 2;
1389         public const int HCBT_SETFOCUS = 9;
1390         public const int HCBT_SYSCOMMAND = 8;
1391         public const int HC_ACTION = 0;
1392         public const int HC_GETNEXT = 1;
1393         public const int HC_NOREM = HC_NOREMOVE;
1394         public const int HC_NOREMOVE = 3;
1395         public const int HC_SKIP = 2;
1396         public const int HC_SYSMODALOFF = 5;
1397         public const int HC_SYSMODALON = 4;
1398         public const int HDATA_APPOWNED = 0x1;
1399         public const int HELP_COMMAND = 0x102;
1400         public const int HELP_CONTENTS = 0x3;
1401         public const int HELP_CONTEXT = 0x1; 
1402         public const int HELP_CONTEXTPOPUP = 0x8;
1403         public const int HELP_FORCEFILE = 0x9;
1404         public const int HELP_HELPONHELP = 0x4; 
1405         public const int HELP_INDEX = 0x3; 
1406         public const int HELP_KEY = 0x101; 
1407         public const int HELP_MULTIKEY = 0x201;
1408         public const int HELP_PARTIALKEY = 0x105;
1409         public const int HELP_QUIT = 0x2; 
1410         public const int HELP_SETCONTENTS = 0x5;
1411         public const int HELP_SETINDEX = 0x5; 
1412         public const int HELP_SETWINPOS = 0x203;
1413         public const int HIDE_WINDOW = 0;
1414         public const int HKL_NEXT = 1;
1415         public const int HKL_PREV = 0;
1416         public const int HSHELL_ACTIVATESHELLWINDOW = 3;
1417         public const int HSHELL_WINDOWCREATED = 1;
1418         public const int HSHELL_WINDOWDESTROYED = 2;
1419         public const int HTBORDER = 18;
1420         public const int HTBOTTOM = 15;
1421         public const int HTBOTTOMLEFT = 16;
1422         public const int HTBOTTOMRIGHT = 17;
1423         public const int HTCAPTION = 2;
1424         public const int HTCLIENT = 1;
1425         public const int HTERROR = (-2);
1426         public const int HTGROWBOX = 4;
1427         public const int HTHSCROLL = 6;
1428         public const int HTLEFT = 10;
1429         public const int HTMAXBUTTON = 9;
1430         public const int HTMENU = 5;
1431         public const int HTMINBUTTON = 8;
1432         public const int HTNOWHERE = 0;
1433         public const int HTREDUCE = HTMINBUTTON;
1434         public const int HTRIGHT = 11;
1435         public const int HTSIZE = HTGROWBOX;
1436         public const int HTSIZEFIRST = HTLEFT;
1437         public const int HTSIZELAST = HTBOTTOMRIGHT;
1438         public const int HTSYSMENU = 3;
1439         public const int HTTOP = 12;
1440         public const int HTTOPLEFT = 13;
1441         public const int HTTOPRIGHT = 14;
1442         public const int HTTRANSPARENT = (-1);
1443         public const int HTVSCROLL = 7;
1444         public const int HTZOOM = HTMAXBUTTON;
1445         public HWND HWND_BOTTOM 
1446         {
1447             get { return (HWND) 1; }
1448         }
1449         public HWND HWND_BROADCAST 
1450         {
1451             get { return (HWND) 0xFFFF; }
1452         }
1453         public HWND HWND_DESKTOP 
1454         {
1455             get { return (HWND) 0; }
1456         }
1457         public HWND HWND_TOP
1458         {
1459             get { return (HWND) 0; }
1460         }
1461         public HWND HWND_NOTOPMOST 
1462         {
1463             get { return (HWND) (-2); }
1464         }
1465         public HWND HWND_TOPMOST 
1466         {
1467             get { return (HWND) (-2); }
1468         }
1469         public const int IDABORT = 3;
1470         public const int IDCANCEL = 2;
1471         public const int IDC_APPSTARTING = 32650;
1472         public const int IDC_ARROW = 32512;
1473         public const int IDC_CROSS = 32515;
1474         public const int IDC_IBEAM = 32513;
1475         public const int IDC_ICON = 32641;
1476         public const int IDC_NO = 32648;
1477         public const int IDC_SIZE = 32640;
1478         public const int IDC_SIZEALL = 32646;
1479         public const int IDC_SIZENESW = 32643;
1480         public const int IDC_SIZENS = 32645;
1481         public const int IDC_SIZENWSE = 32642;
1482         public const int IDC_SIZEWE = 32644;
1483         public const int IDC_UPARROW = 32516;
1484         public const int IDC_WAIT = 32514;
1485         public const int IDHOT_SNAPDESKTOP = (-2); 
1486         public const int IDHOT_SNAPWINDOW = (-1); 
1487         public const int IDIGNORE = 5;
1488         public const int IDI_APPLICATION = 32512;
1489         public const int IDI_ASTERISK = 32516;
1490         public const int IDI_EXCLAMATION = 32515;
1491         public const int IDI_HAND = 32513;
1492         public const int IDI_QUESTION = 32514;
1493         public const int IDNO = 7;
1494         public const int IDOK = 1;
1495         public const int IDRETRY = 4;
1496         public const int IDYES = 6;
1497         public const int INVALID_HANDLE_VALUE = -1;
1498         public const int KEYEVENTF_EXTENDEDKEY = 0x1;
1499         public const int KEYEVENTF_KEYUP = 0x2;
1500         public const int KF_ALTDOWN = 0x2000;
1501         public const int KF_DLGMODE = 0x800;
1502         public const int KF_EXTENDED = 0x100;
1503         public const int KF_MENUMODE = 0x1000;
1504         public const int KF_REPEAT = 0x4000;
1505         public const int KF_UP = 0x8000;
1506         public const int KLF_ACTIVATE = 0x1;
1507         public const int KLF_REORDER = 0x8;
1508         public const int KLF_SUBSTITUTE_OK = 0x2;
1509         public const int KLF_UNLOADPREVIOUS = 0x4;
1510         public const int KL_NAMELENGTH = 9;
1511         public const int LBN_DBLCLK = 2;
1512         public const int LBN_ERRSPACE = (-2);
1513         public const int LBN_KILLFOCUS = 5;
1514         public const int LBN_SELCANCEL = 3;
1515         public const int LBN_SELCHANGE = 1;
1516         public const int LBN_SETFOCUS = 4;
1517         public const int LBS_DISABLENOSCROLL = 0x1000;
1518         public const int LBS_EXTENDEDSEL = 0x800;
1519         public const int LBS_HASSTRINGS = 0x40;
1520         public const int LBS_MULTICOLUMN = 0x200;
1521         public const int LBS_MULTIPLESEL = 0x8;
1522         public const int LBS_NODATA = 0x2000;
1523         public const int LBS_NOINTEGRALHEIGHT = 0x100;
1524         public const int LBS_NOREDRAW = 0x4;
1525         public const int LBS_NOTIFY = 0x1;
1526         public const int LBS_OWNERDRAWFIXED = 0x10;
1527         public const int LBS_OWNERDRAWVARIABLE = 0x20;
1528         public const int LBS_SORT = 0x2;
1529         public const int LBS_STANDARD = (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER);
1530         public const int LBS_USETABSTOPS = 0x80;
1531         public const int LBS_WANTKEYBOARDINPUT = 0x400;
1532         public const int LB_ADDFILE = 0x196;
1533         public const int LB_ADDSTRING = 0x180;
1534         public const int LB_CTLCODE = 0;
1535         public const int LB_DELETESTRING = 0x182;
1536         public const int LB_DIR = 0x18D;
1537         public const int LB_ERR = (-1);
1538         public const int LB_ERRSPACE = (-2);
1539         public const int LB_FINDSTRING = 0x18F;
1540         public const int LB_FINDSTRINGEXACT = 0x1A2;
1541         public const int LB_GETANCHORINDEX = 0x19D;
1542         public const int LB_GETCARETINDEX = 0x19F;
1543         public const int LB_GETCOUNT = 0x18B;
1544         public const int LB_GETCURSEL = 0x188;
1545         public const int LB_GETHORIZONTALEXTENT = 0x193;
1546         public const int LB_GETITEMDATA = 0x199;
1547         public const int LB_GETITEMHEIGHT = 0x1A1;
1548         public const int LB_GETITEMRECT = 0x198;
1549         public const int LB_GETLOCALE = 0x1A6;
1550         public const int LB_GETSEL = 0x187;
1551         public const int LB_GETSELCOUNT = 0x190;
1552         public const int LB_GETSELITEMS = 0x191;
1553         public const int LB_GETTEXT = 0x189;
1554         public const int LB_GETTEXTLEN = 0x18A;
1555         public const int LB_GETTOPINDEX = 0x18E;
1556         public const int LB_INSERTSTRING = 0x181;
1557         public const int LB_MSGMAX = 0x1A8;
1558         public const int LB_OKAY = 0;
1559         public const int LB_RESETCONTENT = 0x184;
1560         public const int LB_SELECTSTRING = 0x18C;
1561         public const int LB_SELITEMRANGE = 0x19B;
1562         public const int LB_SELITEMRANGEEX = 0x183;
1563         public const int LB_SETANCHORINDEX = 0x19C;
1564         public const int LB_SETCARETINDEX = 0x19E;
1565         public const int LB_SETCOLUMNWIDTH = 0x195;
1566         public const int LB_SETCOUNT = 0x1A7;
1567         public const int LB_SETCURSEL = 0x186;
1568         public const int LB_SETHORIZONTALEXTENT = 0x194;
1569         public const int LB_SETITEMDATA = 0x19A;
1570         public const int LB_SETITEMHEIGHT = 0x1A0;
1571         public const int LB_SETLOCALE = 0x1A5;
1572         public const int LB_SETSEL = 0x185;
1573         public const int LB_SETTABSTOPS = 0x192;
1574         public const int LB_SETTOPINDEX = 0x197;
1575         public const int MAX_MONITORS = 4;
1576         public const int MA_ACTIVATE = 1;
1577         public const int MA_ACTIVATEANDEAT = 2;
1578         public const int MA_NOACTIVATE = 3;
1579         public const int MA_NOACTIVATEANDEAT = 4;
1580         public const int MB_ABORTRETRYIGNORE = 0x2;
1581         public const int MB_APPLMODAL = 0x0;
1582         public const int MB_DEFAULT_DESKTOP_ONLY = 0x20000;
1583         public const int MB_DEFBUTTON1 = 0x0;
1584         public const int MB_DEFBUTTON2 = 0x100;
1585         public const int MB_DEFBUTTON3 = 0x200;
1586         public const int MB_DEFMASK = 0xF00;
1587         public const int MB_ICONASTERISK = 0x40;
1588         public const int MB_ICONEXCLAMATION = 0x30;
1589         public const int MB_ICONHAND = 0x10;
1590         public const int MB_ICONINFORMATION = MB_ICONASTERISK;
1591         public const int MB_ICONMASK = 0xF0;
1592         public const int MB_ICONQUESTION = 0x20;
1593         public const int MB_ICONSTOP = MB_ICONHAND;
1594         public const int MB_MISCMASK = 0xC000;
1595         public const int MB_MODEMASK = 0x3000;
1596         public const int MB_NOFOCUS = 0x8000;
1597         public const int MB_OK = 0x0;
1598         public const int MB_OKCANCEL = 0x1;
1599         public const int MB_RETRYCANCEL = 0x5;
1600         public const int MB_SETFOREGROUND = 0x10000;
1601         public const int MB_SYSTEMMODAL = 0x1000;
1602         public const int MB_TASKMODAL = 0x2000;
1603         public const int MB_TYPEMASK = 0xF;
1604         public const int MB_YESNO = 0x4;
1605         public const int MB_YESNOCANCEL = 0x3;
1606         public const int MDIS_ALLCHILDSTYLES = 0x1;
1607         public const int MDITILE_HORIZONTAL = 0x1;
1608         public const int MDITILE_SKIPDISABLED = 0x2;
1609         public const int MDITILE_VERTICAL = 0x0;
1610         public const int MF_APPEND = 0x100;
1611         public const int MF_BITMAP = 0x4;
1612         public const int MF_BYCOMMAND = 0x0;
1613         public const int MF_BYPOSITION = 0x400;
1614         public const int MF_CALLBACKS = 0x8000000;
1615         public const int MF_CHANGE = 0x80;
1616         public const int MF_CHECKED = 0x8;
1617         public const int MF_CONV = 0x40000000;
1618         public const int MF_DELETE = 0x200;
1619         public const int MF_DISABLED = 0x2;
1620         public const int MF_ENABLED = 0x0;
1621         public const int MF_END = 0x80;
1622         public const int MF_ERRORS = 0x10000000;
1623         public const int MF_GRAYED = 0x1;
1624         public const int MF_HELP = 0x4000;
1625         public const int MF_HILITE = 0x80;
1626         public const int MF_HSZ_INFO = 0x1000000;
1627         public const int MF_INSERT = 0x0;
1628         public const int MF_LINKS = 0x20000000;
1629         public const int MF_MASK = unchecked((int)0xFF000000);
1630         public const int MF_MENUBARBREAK = 0x20;
1631         public const int MF_MENUBREAK = 0x40;
1632         public const int MF_MOUSESELECT = 0x8000;
1633         public const int MF_OWNERDRAW = 0x100;
1634         public const int MF_POPUP = 0x10;
1635         public const int MF_POSTMSGS = 0x4000000;
1636         public const int MF_REMOVE = 0x1000;
1637         public const int MF_SENDMSGS = 0x2000000;
1638         public const int MF_SEPARATOR = 0x800;
1639         public const int MF_STRING = 0x0;
1640         public const int MF_SYSMENU = 0x2000;
1641         public const int MF_UNCHECKED = 0x0;
1642         public const int MF_UNHILITE = 0x0;
1643         public const int MF_USECHECKBITMAPS = 0x200;
1644         public const int MH_CLEANUP = 4;
1645         public const int MH_CREATE = 1;
1646         public const int MH_DELETE = 3;
1647         public const int MH_KEEP = 2;
1648         public const int MK_CONTROL = 0x8;
1649         public const int MK_LBUTTON = 0x1;
1650         public const int MK_MBUTTON = 0x10;
1651         public const int MK_RBUTTON = 0x2;
1652         public const int MK_SHIFT = 0x4;
1653         public const int MOD_ALT = 0x1;
1654         public const int MOD_CONTROL = 0x2;
1655         public const int MOD_SHIFT = 0x4;
1656         public const int MOUSEEVENTF_ABSOLUTE = 0x8000; 
1657         public const int MOUSEEVENTF_LEFTDOWN = 0x2; 
1658         public const int MOUSEEVENTF_LEFTUP = 0x4; 
1659         public const int MOUSEEVENTF_MIDDLEDOWN = 0x20; 
1660         public const int MOUSEEVENTF_MIDDLEUP = 0x40; 
1661         public const int MOUSEEVENTF_MOVE = 0x1; 
1662         public const int MOUSEEVENTF_RIGHTDOWN = 0x8; 
1663         public const int MOUSEEVENTF_RIGHTUP = 0x10; 
1664         public const int MSGF_DDEMGR = 0x8001;
1665         public const int MSGF_DIALOGBOX = 0;
1666         public const int MSGF_MAINLOOP = 8;
1667         public const int MSGF_MAX = 8;
1668         public const int MSGF_MENU = 2;
1669         public const int MSGF_MESSAGEBOX = 1;
1670         public const int MSGF_MOVE = 3;
1671         public const int MSGF_NEXTWINDOW = 6;
1672         public const int MSGF_SCROLLBAR = 5;
1673         public const int MSGF_SIZE = 4;
1674         public const int MSGF_USER = 4096;
1675         public const int OBM_BTNCORNERS = 32758;
1676         public const int OBM_BTSIZE = 32761;
1677         public const int OBM_CHECK = 32760;
1678         public const int OBM_CHECKBOXES = 32759;
1679         public const int OBM_CLOSE = 32754;
1680         public const int OBM_COMBO = 32738;
1681         public const int OBM_DNARROW = 32752;
1682         public const int OBM_DNARROWD = 32742;
1683         public const int OBM_DNARROWI = 32736;
1684         public const int OBM_LFARROW = 32750;
1685         public const int OBM_LFARROWD = 32740;
1686         public const int OBM_LFARROWI = 32734;
1687         public const int OBM_MNARROW = 32739;
1688         public const int OBM_OLD_CLOSE = 32767;
1689         public const int OBM_OLD_DNARROW = 32764;
1690         public const int OBM_OLD_LFARROW = 32762;
1691         public const int OBM_OLD_REDUCE = 32757;
1692         public const int OBM_OLD_RESTORE = 32755;
1693         public const int OBM_OLD_RGARROW = 32763;
1694         public const int OBM_OLD_UPARROW = 32765;
1695         public const int OBM_OLD_ZOOM = 32756;
1696         public const int OBM_REDUCE = 32749;
1697         public const int OBM_REDUCED = 32746;
1698         public const int OBM_RESTORE = 32747;
1699         public const int OBM_RESTORED = 32744;
1700         public const int OBM_RGARROW = 32751;
1701         public const int OBM_RGARROWD = 32741;
1702         public const int OBM_RGARROWI = 32735;
1703         public const int OBM_SIZE = 32766;
1704         public const int OBM_UPARROW = 32753;
1705         public const int OBM_UPARROWD = 32743;
1706         public const int OBM_UPARROWI = 32737;
1707         public const int OBM_ZOOM = 32748;
1708         public const int OBM_ZOOMD = 32745;
1709         public const int OCR_CROSS = 32515;
1710         public const int OCR_IBEAM = 32513;
1711         public const int OCR_ICOCUR = 32647;
1712         public const int OCR_ICON = 32641;
1713         public const int OCR_NO = 32648; 
1714         public const int OCR_NORMAL = 32512;
1715         public const int OCR_SIZE = 32640;
1716         public const int OCR_SIZEALL = 32646;
1717         public const int OCR_SIZENESW = 32643;
1718         public const int OCR_SIZENS = 32645;
1719         public const int OCR_SIZENWSE = 32642;
1720         public const int OCR_SIZEWE = 32644;
1721         public const int OCR_UP = 32516;
1722         public const int OCR_WAIT = 32514;
1723         public const int ODA_DRAWENTIRE = 0x1;
1724         public const int ODA_FOCUS = 0x4;
1725         public const int ODA_SELECT = 0x2;
1726         public const int ODS_CHECKED = 0x8;
1727         public const int ODS_DISABLED = 0x4;
1728         public const int ODS_FOCUS = 0x10;
1729         public const int ODS_GRAYED = 0x2;
1730         public const int ODS_SELECTED = 0x1;
1731         public const int ODT_BUTTON = 4;
1732         public const int ODT_COMBOBOX = 3;
1733         public const int ODT_LISTBOX = 2;
1734         public const int ODT_MENU = 1;
1735         public const int OIC_BANG = 32515;
1736         public const int OIC_HAND = 32513;
1737         public const int OIC_NOTE = 32516;
1738         public const int OIC_QUES = 32514;
1739         public const int OIC_SAMPLE = 32512;
1740         public const int ORD_LANGDRIVER = 1; 
1741         public const int PAGE_EXECUTE = 0x10;
1742         public const int PAGE_EXECUTE_READ = 0x20;
1743         public const int PAGE_EXECUTE_READWRITE = 0x40;
1744         public const int PAGE_EXECUTE_WRITECOPY = 0x80;
1745         public const int PAGE_GUARD = 0x100;
1746         public const int PAGE_NOACCESS = 0x1;
1747         public const int PAGE_NOCACHE = 0x200;
1748         public const int PAGE_READONLY = 0x2;
1749         public const int PAGE_READWRITE = 0x4;
1750         public const int PAGE_WRITECOPY = 0x8;
1751         public const int PM_NOREMOVE = 0x0;
1752         public const int PM_NOYIELD = 0x2;
1753         public const int PM_REMOVE = 0x1;
1754         public const int PWR_CRITICALRESUME = 3;
1755         public const int PWR_FAIL = (-1);
1756         public const int PWR_OK = 1;
1757         public const int PWR_SUSPENDREQUEST = 1;
1758         public const int PWR_SUSPENDRESUME = 2;
1759         public const int QID_SYNC = 0xFFFF;
1760         public const int QS_ALLEVENTS = (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY);
1761         public const int QS_ALLINPUT = (QS_SENDMESSAGE | QS_PAINT | QS_TIMER | QS_POSTMESSAGE | QS_MOUSEBUTTON | QS_MOUSEMOVE | QS_HOTKEY | QS_KEY);
1762         public const int QS_HOTKEY = 0x80;
1763         public const int QS_INPUT = (QS_MOUSE | QS_KEY);
1764         public const int QS_KEY = 0x1;
1765         public const int QS_MOUSE = (QS_MOUSEMOVE | QS_MOUSEBUTTON);
1766         public const int QS_MOUSEBUTTON = 0x4;
1767         public const int QS_MOUSEMOVE = 0x2;
1768         public const int QS_PAINT = 0x20;
1769         public const int QS_POSTMESSAGE = 0x8;
1770         public const int QS_SENDMESSAGE = 0x40;
1771         public const int QS_TIMER = 0x10;
1772         public const int RDW_ALLCHILDREN = 0x80;
1773         public const int RDW_ERASE = 0x4;
1774         public const int RDW_ERASENOW = 0x200;
1775         public const int RDW_FRAME = 0x400;
1776         public const int RDW_INTERNALPAINT = 0x2;
1777         public const int RDW_INVALIDATE = 0x1;
1778         public const int RDW_NOCHILDREN = 0x40;
1779         public const int RDW_NOERASE = 0x20;
1780         public const int RDW_NOFRAME = 0x800;
1781         public const int RDW_NOINTERNALPAINT = 0x10;
1782         public const int RDW_UPDATENOW = 0x100;
1783         public const int RDW_VALIDATE = 0x8;
1784         public const int READ = 0; 
1785         public const int READ_WRITE = 2;
1786         public const int SBM_ENABLE_ARROWS = 0xE4; 
1787         public const int SBM_GETPOS = 0xE1; 
1788         public const int SBM_GETRANGE = 0xE3; 
1789         public const int SBM_SETPOS = 0xE0; 
1790         public const int SBM_SETRANGE = 0xE2; 
1791         public const int SBM_SETRANGEREDRAW = 0xE6; 
1792         public const int SBS_BOTTOMALIGN = 0x4;
1793         public const int SBS_HORZ = 0x0;
1794         public const int SBS_LEFTALIGN = 0x2;
1795         public const int SBS_RIGHTALIGN = 0x4;
1796         public const int SBS_SIZEBOX = 0x8;
1797         public const int SBS_SIZEBOXBOTTOMRIGHTALIGN = 0x4;
1798         public const int SBS_SIZEBOXTOPLEFTALIGN = 0x2;
1799         public const int SBS_TOPALIGN = 0x2;
1800         public const int SBS_VERT = 0x1;
1801         public const int SB_BOTH = 3;
1802         public const int SB_BOTTOM = 7;
1803         public const int SB_CTL = 2;
1804         public const int SB_ENDSCROLL = 8;
1805         public const int SB_HORZ = 0;
1806         public const int SB_LEFT = 6;
1807         public const int SB_LINEDOWN = 1;
1808         public const int SB_LINELEFT = 0;
1809         public const int SB_LINERIGHT = 1;
1810         public const int SB_LINEUP = 0;
1811         public const int SB_PAGEDOWN = 3;
1812         public const int SB_PAGELEFT = 2;
1813         public const int SB_PAGERIGHT = 3;
1814         public const int SB_PAGEUP = 2;
1815         public const int SB_RIGHT = 7;
1816         public const int SB_THUMBPOSITION = 4;
1817         public const int SB_THUMBTRACK = 5;
1818         public const int SB_TOP = 6;
1819         public const int SB_VERT = 1;
1820         public const int SC_ARRANGE = 0xF110;
1821         public const int SC_CLOSE = 0xF060;
1822         public const int SC_HOTKEY = 0xF150;
1823         public const int SC_HSCROLL = 0xF080;
1824         public const int SC_ICON = SC_MINIMIZE;
1825         public const int SC_KEYMENU = 0xF100;
1826         public const int SC_MAXIMIZE = 0xF030;
1827         public const int SC_MINIMIZE = 0xF020;
1828         public const int SC_MOUSEMENU = 0xF090;
1829         public const int SC_MOVE = 0xF010;
1830         public const int SC_NEXTWINDOW = 0xF040;
1831         public const int SC_PREVWINDOW = 0xF050;
1832         public const int SC_RESTORE = 0xF120;
1833         public const int SC_SCREENSAVE = 0xF140;
1834         public const int SC_SIZE = 0xF000;
1835         public const int SC_TASKLIST = 0xF130;
1836         public const int SC_VSCROLL = 0xF070;
1837         public const int SC_ZOOM = SC_MAXIMIZE;
1838         public const int SHOW_FULLSCREEN = 3;
1839         public const int SHOW_ICONWINDOW = 2;
1840         public const int SHOW_OPENNOACTIVATE = 4;
1841         public const int SHOW_OPENWINDOW = 1;
1842         public const int SIZEFULLSCREEN = SIZE_MAXIMIZED;
1843         public const int SIZEICONIC = SIZE_MINIMIZED;
1844         public const int SIZENORMAL = SIZE_RESTORED;
1845         public const int SIZEZOOMHIDE = SIZE_MAXHIDE;
1846         public const int SIZEZOOMSHOW = SIZE_MAXSHOW;
1847         public const int SIZE_MAXHIDE = 4;
1848         public const int SIZE_MAXIMIZED = 2;
1849         public const int SIZE_MAXSHOW = 3;
1850         public const int SIZE_MINIMIZED = 1;
1851         public const int SIZE_RESTORED = 0;
1852         public const int SMTO_ABORTIFHUNG = 0x2;
1853         public const int SMTO_BLOCK = 0x1;
1854         public const int SMTO_NORMAL = 0x0;
1855         public const int SM_CMETRICS = 44;
1856         public const int SM_CMOUSEBUTTONS = 43;
1857         public const int SM_CXBORDER = 5;
1858         public const int SM_CXCURSOR = 13;
1859         public const int SM_CXDLGFRAME = 7;
1860         public const int SM_CXDOUBLECLK = 36;
1861         public const int SM_CXFIXEDFRAME = SM_CXDLGFRAME;
1862         public const int SM_CXFRAME = 32;
1863         public const int SM_CXFULLSCREEN = 16;
1864         public const int SM_CXHSCROLL = 21;
1865         public const int SM_CXHTHUMB = 10;
1866         public const int SM_CXICON = 11;
1867         public const int SM_CXICONSPACING = 38;
1868         public const int SM_CXMIN = 28;
1869         public const int SM_CXMINTRACK = 34;
1870         public const int SM_CXSCREEN = 0;
1871         public const int SM_CXSIZE = 30;
1872         public const int SM_CXSIZEFRAME = SM_CXFRAME;
1873         public const int SM_CXVSCROLL = 2;
1874         public const int SM_CYBORDER = 6;
1875         public const int SM_CYCAPTION = 4;
1876         public const int SM_CYCURSOR = 14;
1877         public const int SM_CYDLGFRAME = 8;
1878         public const int SM_CYDOUBLECLK = 37;
1879         public const int SM_CYFIXEDFRAME = SM_CYDLGFRAME;
1880         public const int SM_CYFRAME = 33;
1881         public const int SM_CYFULLSCREEN = 17;
1882         public const int SM_CYHSCROLL = 3;
1883         public const int SM_CYICON = 12;
1884         public const int SM_CYICONSPACING = 39;
1885         public const int SM_CYKANJIWINDOW = 18;
1886         public const int SM_CYMENU = 15;
1887         public const int SM_CYMIN = 29;
1888         public const int SM_CYMINTRACK = 35;
1889         public const int SM_CYSCREEN = 1;
1890         public const int SM_CYSIZE = 31;
1891         public const int SM_CYSIZEFRAME = SM_CYFRAME;
1892         public const int SM_CYVSCROLL = 20;
1893         public const int SM_CYVTHUMB = 9;
1894         public const int SM_DBCSENABLED = 42;
1895         public const int SM_DEBUG = 22;
1896         public const int SM_MENUDROPALIGNMENT = 40;
1897         public const int SM_MOUSEPRESENT = 19;
1898         public const int SM_PENWINDOWS = 41;
1899         public const int SM_RESERVED1 = 24;
1900         public const int SM_RESERVED2 = 25;
1901         public const int SM_RESERVED3 = 26;
1902         public const int SM_RESERVED4 = 27;
1903         public const int SM_SWAPBUTTON = 23;
1904         public const int SPIF_SENDWININICHANGE = 0x2;
1905         public const int SPIF_UPDATEINIFILE = 0x1;
1906         public const int SPI_GETACCESSTIMEOUT = 60;
1907         public const int SPI_GETANIMATION = 72;
1908         public const int SPI_GETBEEP = 1;
1909         public const int SPI_GETBORDER = 5;
1910         public const int SPI_GETDEFAULTINPUTLANG = 89;
1911         public const int SPI_GETDRAGFULLWINDOWS = 38;
1912         public const int SPI_GETFASTTASKSWITCH = 35;
1913         public const int SPI_GETFILTERKEYS = 50;
1914         public const int SPI_GETFONTSMOOTHING = 74;
1915         public const int SPI_GETGRIDGRANULARITY = 18;
1916         public const int SPI_GETHIGHCONTRAST = 66;
1917         public const int SPI_GETICONMETRICS = 45;
1918         public const int SPI_GETICONTITLELOGFONT = 31;
1919         public const int SPI_GETICONTITLEWRAP = 25;
1920         public const int SPI_GETKEYBOARDDELAY = 22;
1921         public const int SPI_GETKEYBOARDPREF = 68;
1922         public const int SPI_GETKEYBOARDSPEED = 10;
1923         public const int SPI_GETLOWPOWERACTIVE = 83;
1924         public const int SPI_GETLOWPOWERTIMEOUT = 79;
1925         public const int SPI_GETMENUDROPALIGNMENT = 27;
1926         public const int SPI_GETMINIMIZEDMETRICS = 43;
1927         public const int SPI_GETMOUSE = 3;
1928         public const int SPI_GETMOUSEKEYS = 54;
1929         public const int SPI_GETMOUSETRAILS = 94;
1930         public const int SPI_GETNONCLIENTMETRICS = 41;
1931         public const int SPI_GETPOWEROFFACTIVE = 84;
1932         public const int SPI_GETPOWEROFFTIMEOUT = 80;
1933         public const int SPI_GETSCREENREADER = 70;
1934         public const int SPI_GETSCREENSAVEACTIVE = 16;
1935         public const int SPI_GETSCREENSAVETIMEOUT = 14;
1936         public const int SPI_GETSERIALKEYS = 62;
1937         public const int SPI_GETSHOWSOUNDS = 56;
1938         public const int SPI_GETSOUNDSENTRY = 64;
1939         public const int SPI_GETSTICKYKEYS = 58;
1940         public const int SPI_GETTOGGLEKEYS = 52;
1941         public const int SPI_GETWINDOWSEXTENSION = 92;
1942         public const int SPI_GETWORKAREA = 48;
1943         public const int SPI_ICONHORIZONTALSPACING = 13;
1944         public const int SPI_ICONVERTICALSPACING = 24;
1945         public const int SPI_LANGDRIVER = 12;
1946         public const int SPI_SCREENSAVERRUNNING = 97;
1947         public const int SPI_SETACCESSTIMEOUT = 61;
1948         public const int SPI_SETANIMATION = 73;
1949         public const int SPI_SETBEEP = 2;
1950         public const int SPI_SETBORDER = 6;
1951         public const int SPI_SETCURSORS = 87;
1952         public const int SPI_SETDEFAULTINPUTLANG = 90;
1953         public const int SPI_SETDESKPATTERN = 21;
1954         public const int SPI_SETDESKWALLPAPER = 20;
1955         public const int SPI_SETDOUBLECLICKTIME = 32;
1956         public const int SPI_SETDOUBLECLKHEIGHT = 30;
1957         public const int SPI_SETDOUBLECLKWIDTH = 29;
1958         public const int SPI_SETDRAGFULLWINDOWS = 37;
1959         public const int SPI_SETDRAGHEIGHT = 77;
1960         public const int SPI_SETDRAGWIDTH = 76;
1961         public const int SPI_SETFASTTASKSWITCH = 36;
1962         public const int SPI_SETFILTERKEYS = 51;
1963         public const int SPI_SETFONTSMOOTHING = 75;
1964         public const int SPI_SETGRIDGRANULARITY = 19;
1965         public const int SPI_SETHANDHELD = 78;
1966         public const int SPI_SETHIGHCONTRAST = 67;
1967         public const int SPI_SETICONMETRICS = 46;
1968         public const int SPI_SETICONS = 88;
1969         public const int SPI_SETICONTITLELOGFONT = 34;
1970         public const int SPI_SETICONTITLEWRAP = 26;
1971         public const int SPI_SETKEYBOARDDELAY = 23;
1972         public const int SPI_SETKEYBOARDPREF = 69;
1973         public const int SPI_SETKEYBOARDSPEED = 11;
1974         public const int SPI_SETLANGTOGGLE = 91;
1975         public const int SPI_SETLOWPOWERACTIVE = 85;
1976         public const int SPI_SETLOWPOWERTIMEOUT = 81;
1977         public const int SPI_SETMENUDROPALIGNMENT = 28;
1978         public const int SPI_SETMINIMIZEDMETRICS = 44;
1979         public const int SPI_SETMOUSE = 4;
1980         public const int SPI_SETMOUSEBUTTONSWAP = 33;
1981         public const int SPI_SETMOUSEKEYS = 55;
1982         public const int SPI_SETMOUSETRAILS = 93;
1983         public const int SPI_SETNONCLIENTMETRICS = 42;
1984         public const int SPI_SETPENWINDOWS = 49;
1985         public const int SPI_SETPOWEROFFACTIVE = 86;
1986         public const int SPI_SETPOWEROFFTIMEOUT = 82;
1987         public const int SPI_SETSCREENREADER = 71;
1988         public const int SPI_SETSCREENSAVEACTIVE = 17;
1989         public const int SPI_SETSCREENSAVETIMEOUT = 15;
1990         public const int SPI_SETSERIALKEYS = 63;
1991         public const int SPI_SETSHOWSOUNDS = 57;
1992         public const int SPI_SETSOUNDSENTRY = 65;
1993         public const int SPI_SETSTICKYKEYS = 59;
1994         public const int SPI_SETTOGGLEKEYS = 53;
1995         public const int SPI_SETWORKAREA = 47;
1996         public const int SS_BLACKFRAME = 0x7;
1997         public const int SS_BLACKRECT = 0x4;
1998         public const int SS_CENTER = 0x1;
1999         public const int SS_GRAYFRAME = 0x8;
2000         public const int SS_GRAYRECT = 0x5;
2001         public const int SS_ICON = 0x3;
2002         public const int SS_LEFT = 0x0;
2003         public const int SS_LEFTNOWORDWRAP = 0xC;
2004         public const int SS_NOPREFIX = 0x80; 
2005         public const int SS_RIGHT = 0x2;
2006         public const int SS_SIMPLE = 0xB;
2007         public const int SS_USERITEM = 0xA;
2008         public const int SS_WHITEFRAME = 0x9;
2009         public const int SS_WHITERECT = 0x6;
2010         public const int STM_GETICON = 0x171;
2011         public const int STM_MSGMAX = 0x172;
2012         public const int STM_SETICON = 0x170;
2013         public const int ST_ADVISE = 0x2;
2014         public const int ST_BEGINSWP = 0;
2015         public const int ST_BLOCKED = 0x8;
2016         public const int ST_BLOCKNEXT = 0x80;
2017         public const int ST_CLIENT = 0x10;
2018         public const int ST_CONNECTED = 0x1;
2019         public const int ST_ENDSWP = 1;
2020         public const int ST_INLIST = 0x40;
2021         public const int ST_ISLOCAL = 0x4;
2022         public const int ST_ISSELF = 0x100;
2023         public const int ST_TERMINATED = 0x20;
2024         public const int SWP_DRAWFRAME = SWP_FRAMECHANGED;
2025         public const int SWP_FRAMECHANGED = 0x20; 
2026         public const int SWP_HIDEWINDOW = 0x80;
2027         public const int SWP_NOACTIVATE = 0x10;
2028         public const int SWP_NOCOPYBITS = 0x100;
2029         public const int SWP_NOMOVE = 0x2;
2030         public const int SWP_NOOWNERZORDER = 0x200; 
2031         public const int SWP_NOREDRAW = 0x8;
2032         public const int SWP_NOREPOSITION = SWP_NOOWNERZORDER;
2033         public const int SWP_NOSIZE = 0x1;
2034         public const int SWP_NOZORDER = 0x4;
2035         public const int SWP_SHOWWINDOW = 0x40;
2036         public const int SW_ERASE = 0x4;
2037         public const int SW_HIDE = 0;
2038         public const int SW_INVALIDATE = 0x2;
2039         public const int SW_MAX = 10;
2040         public const int SW_MAXIMIZE = 3;
2041         public const int SW_MINIMIZE = 6;
2042         public const int SW_NORMAL = 1;
2043         public const int SW_OTHERUNZOOM = 4;
2044         public const int SW_OTHERZOOM = 2;
2045         public const int SW_PARENTCLOSING = 1;
2046         public const int SW_PARENTOPENING = 3;
2047         public const int SW_RESTORE = 9;
2048         public const int SW_SCROLLCHILDREN = 0x1;
2049         public const int SW_SHOW = 5;
2050         public const int SW_SHOWDEFAULT = 10;
2051         public const int SW_SHOWMAXIMIZED = 3;
2052         public const int SW_SHOWMINIMIZED = 2;
2053         public const int SW_SHOWMINNOACTIVE = 7;
2054         public const int SW_SHOWNA = 8;
2055         public const int SW_SHOWNOACTIVATE = 4;
2056         public const int SW_SHOWNORMAL = 1;
2057         public const int TIMEOUT_ASYNC = 0xFFFF;
2058         public const int TPM_CENTERALIGN = 0x4;
2059         public const int TPM_LEFTALIGN = 0x0;
2060         public const int TPM_LEFTBUTTON = 0x0;
2061         public const int TPM_RIGHTALIGN = 0x8;
2062         public const int TPM_RIGHTBUTTON = 0x2;
2063         public const int VK_ADD = 0x6B;
2064         public const int VK_ATTN = 0xF6;
2065         public const int VK_BACK = 0x8;
2066         public const int VK_CANCEL = 0x3;
2067         public const int VK_CAPITAL = 0x14;
2068         public const int VK_CLEAR = 0xC;
2069         public const int VK_CONTROL = 0x11;
2070         public const int VK_CRSEL = 0xF7;
2071         public const int VK_DECIMAL = 0x6E;
2072         public const int VK_DELETE = 0x2E;
2073         public const int VK_DIVIDE = 0x6F;
2074         public const int VK_DOWN = 0x28;
2075         public const int VK_END = 0x23;
2076         public const int VK_EREOF = 0xF9;
2077         public const int VK_ESCAPE = 0x1B;
2078         public const int VK_EXECUTE = 0x2B;
2079         public const int VK_EXSEL = 0xF8;
2080         public const int VK_F1 = 0x70;
2081         public const int VK_F10 = 0x79;
2082         public const int VK_F11 = 0x7A;
2083         public const int VK_F12 = 0x7B;
2084         public const int VK_F13 = 0x7C;
2085         public const int VK_F14 = 0x7D;
2086         public const int VK_F15 = 0x7E;
2087         public const int VK_F16 = 0x7F;
2088         public const int VK_F17 = 0x80;
2089         public const int VK_F18 = 0x81;
2090         public const int VK_F19 = 0x82;
2091         public const int VK_F2 = 0x71;
2092         public const int VK_F20 = 0x83;
2093         public const int VK_F21 = 0x84;
2094         public const int VK_F22 = 0x85;
2095         public const int VK_F23 = 0x86;
2096         public const int VK_F24 = 0x87;
2097         public const int VK_F3 = 0x72;
2098         public const int VK_F4 = 0x73;
2099         public const int VK_F5 = 0x74;
2100         public const int VK_F6 = 0x75;
2101         public const int VK_F7 = 0x76;
2102         public const int VK_F8 = 0x77;
2103         public const int VK_F9 = 0x78;
2104         public const int VK_HELP = 0x2F;
2105         public const int VK_HOME = 0x24;
2106         public const int VK_INSERT = 0x2D;
2107         public const int VK_LBUTTON = 0x1;
2108         public const int VK_LCONTROL = 0xA2;
2109         public const int VK_LEFT = 0x25;
2110         public const int VK_LMENU = 0xA4;
2111         public const int VK_LSHIFT = 0xA0;
2112         public const int VK_MBUTTON = 0x4; 
2113         public const int VK_MENU = 0x12;
2114         public const int VK_MULTIPLY = 0x6A;
2115         public const int VK_NEXT = 0x22;
2116         public const int VK_NONAME = 0xFC;
2117         public const int VK_NUMLOCK = 0x90;
2118         public const int VK_NUMPAD0 = 0x60;
2119         public const int VK_NUMPAD1 = 0x61;
2120         public const int VK_NUMPAD2 = 0x62;
2121         public const int VK_NUMPAD3 = 0x63;
2122         public const int VK_NUMPAD4 = 0x64;
2123         public const int VK_NUMPAD5 = 0x65;
2124         public const int VK_NUMPAD6 = 0x66;
2125         public const int VK_NUMPAD7 = 0x67;
2126         public const int VK_NUMPAD8 = 0x68;
2127         public const int VK_NUMPAD9 = 0x69;
2128         public const int VK_OEM_CLEAR = 0xFE;
2129         public const int VK_PA1 = 0xFD;
2130         public const int VK_PAUSE = 0x13;
2131         public const int VK_PLAY = 0xFA;
2132         public const int VK_PRINT = 0x2A;
2133         public const int VK_PRIOR = 0x21;
2134         public const int VK_RBUTTON = 0x2;
2135         public const int VK_RCONTROL = 0xA3;
2136         public const int VK_RETURN = 0xD;
2137         public const int VK_RIGHT = 0x27;
2138         public const int VK_RMENU = 0xA5;
2139         public const int VK_RSHIFT = 0xA1;
2140         public const int VK_SCROLL = 0x91;
2141         public const int VK_SELECT = 0x29;
2142         public const int VK_SEPARATOR = 0x6C;
2143         public const int VK_SHIFT = 0x10;
2144         public const int VK_SNAPSHOT = 0x2C;
2145         public const int VK_SPACE = 0x20;
2146         public const int VK_SUBTRACT = 0x6D;
2147         public const int VK_TAB = 0x9;
2148         public const int VK_UP = 0x26;
2149         public const int VK_ZOOM = 0xFB;
2150         public const int WA_ACTIVE = 1;
2151         public const int WA_CLICKACTIVE = 2;
2152         public const int WA_INACTIVE = 0;
2153         public const int WB_ISDELIMITER = 2;
2154         public const int WB_LEFT = 0;
2155         public const int WB_RIGHT = 1;
2156         public const int WC_DIALOG = 8002;
2157         public const int WH_CALLWNDPROC = 4;
2158         public const int WH_CBT = 5;
2159         public const int WH_DEBUG = 9;
2160         public const int WH_FOREGROUNDIDLE = 11;
2161         public const int WH_GETMESSAGE = 3;
2162         public const int WH_HARDWARE = 8;
2163         public const int WH_JOURNALPLAYBACK = 1;
2164         public const int WH_JOURNALRECORD = 0;
2165         public const int WH_KEYBOARD = 2;
2166         public const int WH_MAX = 11;
2167         public const int WH_MIN = (-1);
2168         public const int WH_MOUSE = 7;
2169         public const int WH_MSGFILTER = (-1);
2170         public const int WH_SHELL = 10;
2171         public const int WH_SYSMSGFILTER = 6;
2172         public const int WINSTA_ACCESSCLIPBOARD = 0x4;
2173         public const int WINSTA_ACCESSPUBLICATOMS = 0x20;
2174         public const int WINSTA_CREATEDESKTOP = 0x8;
2175         public const int WINSTA_ENUMDESKTOPS = 0x1;
2176         public const int WINSTA_ENUMERATE = 0x100;
2177         public const int WINSTA_EXITWINDOWS = 0x40;
2178         public const int WINSTA_READATTRIBUTES = 0x2;
2179         public const int WINSTA_READSCREEN = 0x200;
2180         public const int WINSTA_WRITEATTRIBUTES = 0x10;
2181         public const int WM_ACTIVATE = 0x6;
2182         public const int WM_ACTIVATEAPP = 0x1C;
2183         public const int WM_ASKCBFORMATNAME = 0x30C;
2184         public const int WM_CANCELJOURNAL = 0x4B;
2185         public const int WM_CANCELMODE = 0x1F;
2186         public const int WM_CHANGECBCHAIN = 0x30D;
2187         public const int WM_CHAR = 0x102;
2188         public const int WM_CHARTOITEM = 0x2F;
2189         public const int WM_CHILDACTIVATE = 0x22;
2190         public const int WM_CLEAR = 0x303;
2191         public const int WM_CLOSE = 0x10;
2192         public const int WM_COMMAND = 0x111;
2193         public const int WM_COMMNOTIFY = 0x44; 
2194         public const int WM_COMPACTING = 0x41;
2195         public const int WM_COMPAREITEM = 0x39;
2196         public const int WM_COPY = 0x301;
2197         public const int WM_COPYDATA = 0x4A;
2198         public const int WM_CREATE = 0x1;
2199         public const int WM_CTLCOLORBTN = 0x135;
2200         public const int WM_CTLCOLORDLG = 0x136;
2201         public const int WM_CTLCOLOREDIT = 0x133;
2202         public const int WM_CTLCOLORLISTBOX = 0x134;
2203         public const int WM_CTLCOLORMSGBOX = 0x132;
2204         public const int WM_CTLCOLORSCROLLBAR = 0x137;
2205         public const int WM_CTLCOLORSTATIC = 0x138;
2206         public const int WM_CUT = 0x300;
2207         public const int WM_DDE_ACK = (WM_DDE_FIRST + 4);
2208         public const int WM_DDE_ADVISE = (WM_DDE_FIRST + 2);
2209         public const int WM_DDE_DATA = (WM_DDE_FIRST + 5);
2210         public const int WM_DDE_EXECUTE = (WM_DDE_FIRST + 8);
2211         public const int WM_DDE_FIRST = 0x3E0;
2212         public const int WM_DDE_INITIATE = (WM_DDE_FIRST);
2213         public const int WM_DDE_LAST = (WM_DDE_FIRST + 8);
2214         public const int WM_DDE_POKE = (WM_DDE_FIRST + 7);
2215         public const int WM_DDE_REQUEST = (WM_DDE_FIRST + 6);
2216         public const int WM_DDE_TERMINATE = (WM_DDE_FIRST + 1);
2217         public const int WM_DDE_UNADVISE = (WM_DDE_FIRST + 3);
2218         public const int WM_DEADCHAR = 0x103;
2219         public const int WM_DELETEITEM = 0x2D;
2220         public const int WM_DESTROY = 0x2;
2221         public const int WM_DESTROYCLIPBOARD = 0x307;
2222         public const int WM_DEVMODECHANGE = 0x1B;
2223         public const int WM_DRAWCLIPBOARD = 0x308;
2224         public const int WM_DRAWITEM = 0x2B;
2225         public const int WM_DROPFILES = 0x233;
2226         public const int WM_ENABLE = 0xA;
2227         public const int WM_ENDSESSION = 0x16;
2228         public const int WM_ENTERIDLE = 0x121;
2229         public const int WM_ENTERMENULOOP = 0x211;
2230         public const int WM_ERASEBKGND = 0x14;
2231         public const int WM_EXITMENULOOP = 0x212;
2232         public const int WM_FONTCHANGE = 0x1D;
2233         public const int WM_GETDLGCODE = 0x87;
2234         public const int WM_GETFONT = 0x31;
2235         public const int WM_GETHOTKEY = 0x33;
2236         public const int WM_GETMINMAXINFO = 0x24;
2237         public const int WM_GETTEXT = 0xD;
2238         public const int WM_GETTEXTLENGTH = 0xE;
2239         public const int WM_HOTKEY = 0x312;
2240         public const int WM_HSCROLL = 0x114;
2241         public const int WM_HSCROLLCLIPBOARD = 0x30E;
2242         public const int WM_ICONERASEBKGND = 0x27;
2243         public const int WM_INITDIALOG = 0x110;
2244         public const int WM_INITMENU = 0x116;
2245         public const int WM_INITMENUPOPUP = 0x117;
2246         public const int WM_KEYDOWN = 0x100;
2247         public const int WM_KEYFIRST = 0x100;
2248         public const int WM_KEYLAST = 0x108;
2249         public const int WM_KEYUP = 0x101;
2250         public const int WM_KILLFOCUS = 0x8;
2251         public const int WM_LBUTTONDBLCLK = 0x203;
2252         public const int WM_LBUTTONDOWN = 0x201;
2253         public const int WM_LBUTTONUP = 0x202;
2254         public const int WM_MBUTTONDBLCLK = 0x209;
2255         public const int WM_MBUTTONDOWN = 0x207;
2256         public const int WM_MBUTTONUP = 0x208;
2257         public const int WM_MDIACTIVATE = 0x222;
2258         public const int WM_MDICASCADE = 0x227;
2259         public const int WM_MDICREATE = 0x220;
2260         public const int WM_MDIDESTROY = 0x221;
2261         public const int WM_MDIGETACTIVE = 0x229;
2262         public const int WM_MDIICONARRANGE = 0x228;
2263         public const int WM_MDIMAXIMIZE = 0x225;
2264         public const int WM_MDINEXT = 0x224;
2265         public const int WM_MDIREFRESHMENU = 0x234;
2266         public const int WM_MDIRESTORE = 0x223;
2267         public const int WM_MDISETMENU = 0x230;
2268         public const int WM_MDITILE = 0x226;
2269         public const int WM_MEASUREITEM = 0x2C;
2270         public const int WM_MENUCHAR = 0x120;
2271         public const int WM_MENUSELECT = 0x11F;
2272         public const int WM_MOUSEACTIVATE = 0x21;
2273         public const int WM_MOUSEFIRST = 0x200;
2274         public const int WM_MOUSELAST = 0x209;
2275         public const int WM_MOUSEMOVE = 0x200;
2276         public const int WM_MOVE = 0x3;
2277         public const int WM_NCACTIVATE = 0x86;
2278         public const int WM_NCCALCSIZE = 0x83;
2279         public const int WM_NCCREATE = 0x81;
2280         public const int WM_NCDESTROY = 0x82;
2281         public const int WM_NCHITTEST = 0x84;
2282         public const int WM_NCLBUTTONDBLCLK = 0xA3;
2283         public const int WM_NCLBUTTONDOWN = 0xA1;
2284         public const int WM_NCLBUTTONUP = 0xA2;
2285         public const int WM_NCMBUTTONDBLCLK = 0xA9;
2286         public const int WM_NCMBUTTONDOWN = 0xA7;
2287         public const int WM_NCMBUTTONUP = 0xA8;
2288         public const int WM_NCMOUSEMOVE = 0xA0;
2289         public const int WM_NCPAINT = 0x85;
2290         public const int WM_NCRBUTTONDBLCLK = 0xA6;
2291         public const int WM_NCRBUTTONDOWN = 0xA4;
2292         public const int WM_NCRBUTTONUP = 0xA5;
2293         public const int WM_NEXTDLGCTL = 0x28;
2294         public const int WM_NULL = 0x0;
2295         public const int WM_OTHERWINDOWCREATED = 0x42; 
2296         public const int WM_OTHERWINDOWDESTROYED = 0x43; 
2297         public const int WM_PAINT = 0xF;
2298         public const int WM_PAINTCLIPBOARD = 0x309;
2299         public const int WM_PAINTICON = 0x26;
2300         public const int WM_PALETTECHANGED = 0x311;
2301         public const int WM_PALETTEISCHANGING = 0x310;
2302         public const int WM_PARENTNOTIFY = 0x210;
2303         public const int WM_PASTE = 0x302;
2304         public const int WM_PENWINFIRST = 0x380;
2305         public const int WM_PENWINLAST = 0x38F;
2306         public const int WM_POWER = 0x48;
2307         public const int WM_QUERYDRAGICON = 0x37;
2308         public const int WM_QUERYENDSESSION = 0x11;
2309         public const int WM_QUERYNEWPALETTE = 0x30F;
2310         public const int WM_QUERYOPEN = 0x13;
2311         public const int WM_QUEUESYNC = 0x23;
2312         public const int WM_QUIT = 0x12;
2313         public const int WM_RBUTTONDBLCLK = 0x206;
2314         public const int WM_RBUTTONDOWN = 0x204;
2315         public const int WM_RBUTTONUP = 0x205;
2316         public const int WM_RENDERALLFORMATS = 0x306;
2317         public const int WM_RENDERFORMAT = 0x305;
2318         public const int WM_SETCURSOR = 0x20;
2319         public const int WM_SETFOCUS = 0x7;
2320         public const int WM_SETFONT = 0x30;
2321         public const int WM_SETHOTKEY = 0x32;
2322         public const int WM_SETREDRAW = 0xB;
2323         public const int WM_SETTEXT = 0xC;
2324         public const int WM_SHOWWINDOW = 0x18;
2325         public const int WM_SIZE = 0x5;
2326         public const int WM_SIZECLIPBOARD = 0x30B;
2327         public const int WM_SPOOLERSTATUS = 0x2A;
2328         public const int WM_SYSCHAR = 0x106;
2329         public const int WM_SYSCOLORCHANGE = 0x15;
2330         public const int WM_SYSCOMMAND = 0x112;
2331         public const int WM_SYSDEADCHAR = 0x107;
2332         public const int WM_SYSKEYDOWN = 0x104;
2333         public const int WM_SYSKEYUP = 0x105;
2334         public const int WM_TIMECHANGE = 0x1E;
2335         public const int WM_TIMER = 0x113;
2336         public const int WM_UNDO = 0x304;
2337         public const int WM_USER = 0x400;
2338         public const int WM_VKEYTOITEM = 0x2E;
2339         public const int WM_VSCROLL = 0x115;
2340         public const int WM_VSCROLLCLIPBOARD = 0x30A;
2341         public const int WM_WINDOWPOSCHANGED = 0x47;
2342         public const int WM_WINDOWPOSCHANGING = 0x46;
2343         public const int WM_WININICHANGE = 0x1A;
2344         public const int WPF_RESTORETOMAXIMIZED = 0x2;
2345         public const int WPF_SETMINPOSITION = 0x1;
2346         public const int WRITE = 1;
2347         public const int WS_BORDER = 0x800000;
2348         public const int WS_CAPTION = 0xC00000; 
2349         public const int WS_CHILD = 0x40000000;
2350         public const int WS_CHILDWINDOW = (WS_CHILD);
2351         public const int WS_CLIPCHILDREN = 0x2000000;
2352         public const int WS_CLIPSIBLINGS = 0x4000000;
2353         public const int WS_DISABLED = 0x8000000;
2354         public const int WS_DLGFRAME = 0x400000;
2355         public const int WS_EX_ACCEPTFILES = 0x10;
2356         public const int WS_EX_DLGMODALFRAME = 0x1;
2357         public const int WS_EX_NOPARENTNOTIFY = 0x4;
2358         public const int WS_EX_TOPMOST = 0x8;
2359         public const int WS_EX_TRANSPARENT = 0x20;
2360         public const int WS_GROUP = 0x20000;
2361         public const int WS_HSCROLL = 0x100000;
2362         public const int WS_ICONIC = WS_MINIMIZE;
2363         public const int WS_MAXIMIZE = 0x1000000;
2364         public const int WS_MAXIMIZEBOX = 0x10000;
2365         public const int WS_MINIMIZE = 0x20000000;
2366         public const int WS_MINIMIZEBOX = 0x20000;
2367         public const int WS_OVERLAPPED = 0x0;
2368         public const int WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX);
2369         public const int WS_POPUP = unchecked((int)0x80000000);
2370         public const int WS_POPUPWINDOW = (WS_POPUP | WS_BORDER | WS_SYSMENU);
2371         public const int WS_SIZEBOX = WS_THICKFRAME;
2372         public const int WS_SYSMENU = 0x80000;
2373         public const int WS_TABSTOP = 0x10000;
2374         public const int WS_THICKFRAME = 0x40000;
2375         public const int WS_TILED = WS_OVERLAPPED;
2376         public const int WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW;
2377         public const int WS_VISIBLE = 0x10000000;
2378         public const int WS_VSCROLL = 0x200000;
2379         public const int WVR_ALIGNBOTTOM = 0x40;
2380         public const int WVR_ALIGNLEFT = 0x20;
2381         public const int WVR_ALIGNRIGHT = 0x80;
2382         public const int WVR_ALIGNTOP = 0x10;
2383         public const int WVR_HREDRAW = 0x100;
2384         public const int WVR_REDRAW = (WVR_HREDRAW | WVR_VREDRAW);
2385         public const int WVR_VALIDRECTS = 0x400;
2386         public const int WVR_VREDRAW = 0x200;
2387         public const int XCLASS_BOOL = 0x1000;
2388         public const int XCLASS_DATA = 0x2000;
2389         public const int XCLASS_FLAGS = 0x4000;
2390         public const int XCLASS_MASK = 0xFC00;
2391         public const int XCLASS_NOTIFICATION = 0x8000;
2392         public const int XST_ADVACKRCVD = 13;
2393         public const int XST_ADVDATAACKRCVD = 16;
2394         public const int XST_ADVDATASENT = 15;
2395         public const int XST_ADVSENT = 11;
2396         public const int XST_CONNECTED = 2;
2397         public const int XST_DATARCVD = 6;
2398         public const int XST_EXECACKRCVD = 10;
2399         public const int XST_EXECSENT = 9;
2400         public const int XST_INCOMPLETE = 1;
2401         public const int XST_INIT1 = 3; 
2402         public const int XST_INIT2 = 4;
2403         public const int XST_NULL = 0; 
2404         public const int XST_POKEACKRCVD = 8;
2405         public const int XST_POKESENT = 7;
2406         public const int XST_REQSENT = 5; 
2407         public const int XST_UNADVACKRCVD = 14;
2408         public const int XST_UNADVSENT = 12;
2409         public const int XTYPF_ACKREQ = 0x8; 
2410         public const int XTYPF_NOBLOCK = 0x2; 
2411         public const int XTYPF_NODATA = 0x4; 
2412         public const int XTYP_ADVDATA = (0x10 | XCLASS_FLAGS);
2413         public const int XTYP_ADVREQ = (0x20 | XCLASS_DATA | XTYPF_NOBLOCK);
2414         public const int XTYP_ADVSTART = (0x30 | XCLASS_BOOL);
2415         public const int XTYP_ADVSTOP = (0x40 | XCLASS_NOTIFICATION);
2416         public const int XTYP_CONNECT = (0x60 | XCLASS_BOOL | XTYPF_NOBLOCK);
2417         public const int XTYP_CONNECT_CONFIRM = (0x70 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
2418         public const int XTYP_DISCONNECT = (0xC0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
2419         public const int XTYP_ERROR = (0x0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
2420         public const int XTYP_EXECUTE = (0x50 | XCLASS_FLAGS);
2421         public const int XTYP_MASK = 0xF0;
2422         public const int XTYP_MONITOR = (0xF0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
2423         public const int XTYP_POKE = (0x90 | XCLASS_FLAGS);
2424         public const int XTYP_REGISTER = (0xA0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
2425         public const int XTYP_REQUEST = (0xB0 | XCLASS_DATA);
2426         public const int XTYP_SHIFT = 4; 
2427         public const int XTYP_UNREGISTER = (0xD0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK);
2428         public const int XTYP_WILDCONNECT = (0xE0 | XCLASS_DATA | XTYPF_NOBLOCK);
2429         public const int XTYP_XACT_COMPLETE = (0x80 | XCLASS_NOTIFICATION);
2430         public const string SZDDESYS_ITEM_FORMATS = "Formats";
2431         public const string SZDDESYS_ITEM_HELP = "Help";
2432         public const string SZDDESYS_ITEM_RTNMSG = "ReturnMessage";
2433         public const string SZDDESYS_ITEM_STATUS = "Status";
2434         public const string SZDDESYS_ITEM_SYSITEMS = "SysItems";
2435         public const string SZDDESYS_ITEM_TOPICS = "Topics";
2436         public const string SZDDESYS_TOPIC = "System";
2437         public const string SZDDE_ITEM_ITEMLIST = "TopicItemList";
2438     }
2439 }
View Code

Shell.cs

using System;
using System.Runtime.InteropServices;

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

namespace Win32
{
    public struct DRAGINFO 
    {
        public int uSize; 
        public POINT pt;
        public int fNC;
        public string lpFileList;
        public int grfKeyState;
    }
    public struct APPBARDATA 
    {
        public int cbSize;
        public HWND hwnd;
        public int uCallbackMessage;
        public int uEdge;
        public RECT rc;
        public int lParam; 
    }
    public struct SHFILEOPSTRUCT 
    {
        public HWND hwnd;
        public int wFunc;
        public string pFrom;
        public string pTo;
        public short fFlags;
        public int fAnyOperationsAborted;
        public HANDLE hNameMappings;
        public string lpszProgressTitle; 
    }
    public struct SHNAMEMAPPING 
    {
        public string pszOldPath;
        public string pszNewPath;
        public int cchOldPath;
        public int cchNewPath;
    }
    public struct SHELLEXECUTEINFO 
    {
        public int cbSize;
        public int fMask;
        public HWND hwnd;
        public string lpVerb;
        public string lpFile;
        public string lpParameters;
        public string lpDirectory;
        public int nShow;
        public HANDLE hInstApp;
        public int lpIDList;
        public string lpClass;
        public HANDLE hkeyClass;
        public int dwHotKey;
        public HANDLE hIcon;
        public HANDLE hProcess;
    }
    public struct NOTIFYICONDATA 
    {
        public int cbSize;
        public HWND hwnd;
        public int uID;
        public int uFlags;
        public int uCallbackMessage;
        public HANDLE hIcon;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)] public string szTip;
    }
    public struct SHFILEINFO 
    {
        public HANDLE hIcon; 
        public int iIcon; 
        public int dwAttributes; 
        [MarshalAs(UnmanagedType.ByValArray, SizeConst=Kernel.MAX_PATH)]public string szDisplayName; 
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst=80)] public string szTypeName; 
    }

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

        public const int ABE_BOTTOM = 3;
        public const int ABE_LEFT = 0;
        public const int ABE_RIGHT = 2;
        public const int ABE_TOP = 1;
        public const int ABM_ACTIVATE = 0x6; 
        public const int ABM_GETAUTOHIDEBAR = 0x7;
        public const int ABM_GETSTATE = 0x4;
        public const int ABM_GETTASKBARPOS = 0x5;
        public const int ABM_NEW = 0x0;
        public const int ABM_QUERYPOS = 0x2;
        public const int ABM_REMOVE = 0x1;
        public const int ABM_SETAUTOHIDEBAR = 0x8; 
        public const int ABM_SETPOS = 0x3;
        public const int ABM_WINDOWPOSCHANGED = 0x9;
        public const int ABN_FULLSCREENAPP = 0x2;
        public const int ABN_POSCHANGED = 0x1;
        public const int ABN_STATECHANGE = 0x0;
        public const int ABN_WINDOWARRANGE = 0x3; 
        public const int ABS_ALWAYSONTOP = 0x2;
        public const int ABS_AUTOHIDE = 0x1;
        public const int EIRESID = -1;
        public const int FOF_ALLOWUNDO = 0x40;
        public const int FOF_CONFIRMMOUSE = 0x2;
        public const int FOF_FILESONLY = 0x80; 
        public const int FOF_MULTIDESTFILES = 0x1;
        public const int FOF_NOCONFIRMATION = 0x10; 
        public const int FOF_NOCONFIRMMKDIR = 0x200; 
        public const int FOF_RENAMEONCOLLISION = 0x8;
        public const int FOF_SILENT = 0x4; 
        public const int FOF_SIMPLEPROGRESS = 0x100; 
        public const int FOF_WANTMAPPINGHANDLE = 0x20; 
        public const int FO_COPY = 0x2;
        public const int FO_DELETE = 0x3;
        public const int FO_MOVE = 0x1;
        public const int FO_RENAME = 0x4;
        public const int NIF_ICON = 0x2;
        public const int NIF_MESSAGE = 0x1;
        public const int NIF_TIP = 0x4;
        public const int NIM_ADD = 0x0;
        public const int NIM_DELETE = 0x2;
        public const int NIM_MODIFY = 0x1;
        public const int PO_DELETE = 0x13; 
        public const int PO_PORTCHANGE = 0x20; 
        public const int PO_RENAME = 0x14; 
        public const int PO_REN_PORT = 0x34; 
        public const int SEE_MASK_CLASSKEY = 0x3;
        public const int SEE_MASK_CLASSNAME = 0x1;
        public const int SEE_MASK_CONNECTNETDRV = 0x80;
        public const int SEE_MASK_DOENVSUBST = 0x200;
        public const int SEE_MASK_FLAG_DDEWAIT = 0x100;
        public const int SEE_MASK_FLAG_NO_UI = 0x400;
        public const int SEE_MASK_HOTKEY = 0x20;
        public const int SEE_MASK_ICON = 0x10;
        public const int SEE_MASK_IDLIST = 0x4;
        public const int SEE_MASK_INVOKEIDLIST = 0xC;
        public const int SEE_MASK_NOCLOSEPROCESS = 0x40;
        public const int SE_ERR_ACCESSDENIED = 5; 
        public const int SE_ERR_ASSOCINCOMPLETE = 27;
        public const int SE_ERR_DDEBUSY = 30;
        public const int SE_ERR_DDEFAIL = 29;
        public const int SE_ERR_DDETIMEOUT = 28;
        public const int SE_ERR_DLLNOTFOUND = 32;
        public const int SE_ERR_FNF = 2; 
        public const int SE_ERR_NOASSOC = 31;
        public const int SE_ERR_OOM = 8; 
        public const int SE_ERR_PNF = 3; 
        public const int SE_ERR_SHARE = 26;
        public const int SHGFI_ATTRIBUTES = 0x800; 
        public const int SHGFI_DISPLAYNAME = 0x200; 
        public const int SHGFI_EXETYPE = 0x2000; 
        public const int SHGFI_ICON = 0x100; 
        public const int SHGFI_ICONLOCATION = 0x1000; 
        public const int SHGFI_LARGEICON = 0x0; 
        public const int SHGFI_LINKOVERLAY = 0x8000; 
        public const int SHGFI_OPENICON = 0x2; 
        public const int SHGFI_PIDL = 0x8; 
        public const int SHGFI_SELECTED = 0x10000; 
        public const int SHGFI_SHELLICONSIZE = 0x4; 
        public const int SHGFI_SMALLICON = 0x1; 
        public const int SHGFI_SYSICONINDEX = 0x4000; 
        public const int SHGFI_TYPENAME = 0x400; 
        public const int SHGFI_USEFILEATTRIBUTES = 0x10; 
        public const int SHGNLI_PIDL = 0x1; 
        public const int SHGNLI_PREFIXNAME = 0x2; 
    }
}
View Code

 

更多参考《C#封装好的Win32API》

posted on 2016-04-22 11:16  一路前行  阅读(9092)  评论(2编辑  收藏  举报