c# user-defined2.dll 调用全集

来源:互联网 发布:php debug pack怎么用 编辑:程序博客网 时间:2024/06/08 03:58

 // Fields    public const int LAYOUT_BITMAPORIENTATIONPRESERVED = 8;    public const int LAYOUT_RTL = 1;    public const int MB_PRECOMPOSED = 1;    public const int SMTO_ABORTIFHUNG = 2;    private static readonly Version VistaOSVersion;    // Methods    static UnsafeNativeMethods();    [DllImport("user32.dll", EntryPoint="ChildWindowFromPointEx", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern IntPtr _ChildWindowFromPointEx(HandleRef hwndParent, POINTSTRUCT pt, int uFlags);    [DllImport("user32.dll", EntryPoint="WindowFromPoint", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern IntPtr _WindowFromPoint(POINTSTRUCT pt);    public static IntPtr BeginPaint(HandleRef hWnd, [In, Out, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint);    [return: MarshalAs(UnmanagedType.Bool)]    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool BlockInput([In, MarshalAs(UnmanagedType.Bool)] bool fBlockIt);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr CallNextHookEx(HandleRef hhook, int code, IntPtr wparam, IntPtr lparam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr CallWindowProc(IntPtr wndProc, IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);    public static IntPtr ChildWindowFromPointEx(HandleRef hwndParent, int x, int y, int uFlags);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int ClientToScreen(HandleRef hWnd, [In, Out] NativeMethods.POINT pt);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool ClipCursor(NativeMethods.COMRECT rcClip);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool ClipCursor(ref NativeMethods.RECT rcClip);    public static bool CloseHandle(HandleRef handle);    [return: MarshalAs(UnmanagedType.Interface)]    [DllImport("ole32.dll", ExactSpelling=true, PreserveSig=false)]    public static extern object CoCreateInstance([In] ref Guid clsid, [MarshalAs(UnmanagedType.Interface)] object punkOuter, int context, [In] ref Guid iid);    [DllImport("ole32.dll", ExactSpelling=true, PreserveSig=false)]    public static extern IClassFactory2 CoGetClassObject([In] ref Guid clsid, int dwContext, int serverInfo, [In] ref Guid refiid);    [DllImport("ole32.dll")]    public static extern int CoGetMalloc(int dwReserved, out IMalloc pMalloc);    [DllImport("kernel32.dll", EntryPoint="RtlMoveMemory", ExactSpelling=true)]    public static extern void CopyMemory(IntPtr pdst, byte[] psrc, int cb);    [DllImport("kernel32.dll", EntryPoint="RtlMoveMemory", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    public static extern void CopyMemory(HandleRef destData, HandleRef srcData, int size);    [DllImport("kernel32.dll", EntryPoint="RtlMoveMemory", CharSet=CharSet.Ansi, ExactSpelling=true)]    public static extern void CopyMemoryA(IntPtr pdst, char[] psrc, int cb);    [DllImport("kernel32.dll", EntryPoint="RtlMoveMemory", CharSet=CharSet.Ansi, ExactSpelling=true)]    public static extern void CopyMemoryA(IntPtr pdst, string psrc, int cb);    [DllImport("kernel32.dll", EntryPoint="RtlMoveMemory", CharSet=CharSet.Unicode, ExactSpelling=true)]    public static extern void CopyMemoryW(IntPtr pdst, string psrc, int cb);    [DllImport("kernel32.dll", EntryPoint="RtlMoveMemory", CharSet=CharSet.Unicode, ExactSpelling=true)]    public static extern void CopyMemoryW(IntPtr pdst, char[] psrc, int cb);    [DllImport("ole32.dll", ExactSpelling=true)]    public static extern int CoRegisterMessageFilter(HandleRef newFilter, ref IntPtr oldMsgFilter);    [DllImport("mscorwks.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]    internal static extern void CorLaunchApplication(uint hostType, string applicationFullName, int manifestPathsCount, string[] manifestPaths, int activationDataCount, string[] activationData, PROCESS_INFORMATION processInformation);    public static IntPtr CreateAcceleratorTable(HandleRef pentries, int cCount);    public static IntPtr CreateCompatibleDC(HandleRef hDC);    public static IntPtr CreateDC(string lpszDriver);    public static IntPtr CreateDC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef lpInitData);    public static IntPtr CreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef lpInitData);    [DllImport("ole32.dll", PreserveSig=false)]    public static extern ILockBytes CreateILockBytesOnHGlobal(HandleRef hGlobal, bool fDeleteOnRelease);    public static IntPtr CreateMenu();    public static IntPtr CreatePopupMenu();    [DllImport("oleacc.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int CreateStdAccessibleObject(HandleRef hWnd, int objID, ref Guid refiid, [In, Out, MarshalAs(UnmanagedType.Interface)] ref object pAcc);    public static IntPtr CreateWindowEx(int dwExStyle, string lpszClassName, string lpszWindowName, int style, int x, int y, int width, int height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, [MarshalAs(UnmanagedType.AsAny)] object pvParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr DefFrameProc(IntPtr hWnd, IntPtr hWndClient, int msg, IntPtr wParam, IntPtr lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr DefMDIChildProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr DefWindowProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);    public static bool DeleteCompatibleDC(HandleRef hDC);    public static bool DeleteDC(HandleRef hDC);    public static bool DestroyAcceleratorTable(HandleRef hAccel);    public static bool DestroyCursor(HandleRef hCurs);    public static bool DestroyMenu(HandleRef hMenu);    public static bool DestroyWindow(HandleRef hWnd);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr DispatchMessage([In] ref NativeMethods.MSG msg);    [DllImport("user32.dll", CharSet=CharSet.Ansi, ExactSpelling=true)]    public static extern IntPtr DispatchMessageA([In] ref NativeMethods.MSG msg);    [DllImport("user32.dll", CharSet=CharSet.Unicode, ExactSpelling=true)]    public static extern IntPtr DispatchMessageW([In] ref NativeMethods.MSG msg);    [DllImport("shell32.dll", CharSet=CharSet.Ansi, ExactSpelling=true)]    public static extern void DragAcceptFiles(HandleRef hWnd, bool fAccept);    [DllImport("shell32.dll", CharSet=CharSet.Auto)]    public static extern int DragQueryFile(HandleRef hDrop, int iFile, StringBuilder lpszFile, int cch);    public static IntPtr DuplicateHandle(HandleRef processSource, HandleRef handleSource, HandleRef processTarget, ref IntPtr handleTarget, int desiredAccess, bool inheritHandle, int options);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool EnableMenuItem(HandleRef hMenu, int UIDEnabledItem, int uEnable);    [DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    public static extern bool EnableScrollBar(HandleRef hWnd, int nBar, int value);    [DllImport("user32.dll", ExactSpelling=true)]    public static extern bool EndDialog(HandleRef hWnd, IntPtr result);    public static bool EndPaint(HandleRef hWnd, [In, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint);    [DllImport("user32.dll", ExactSpelling=true)]    public static extern bool EnumChildWindows(HandleRef hwndParent, NativeMethods.EnumChildrenCallback lpEnumFunc, HandleRef lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool EnumThreadWindows(int dwThreadId, NativeMethods.EnumThreadWindowsCallback lpfn, HandleRef lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr FindWindow(string className, string windowName);    [DllImport("kernel32.dll", CharSet=CharSet.Auto)]    public static extern bool FreeLibrary(HandleRef hModule);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GetActiveWindow();    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GetAncestor(HandleRef hWnd, int flags);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern short GetAsyncKeyState(int vkey);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GetCapture();    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool GetClassInfo(HandleRef hInst, string lpszClass, IntPtr h);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool GetClassInfo(HandleRef hInst, string lpszClass, [In, Out] NativeMethods.WNDCLASS_I wc);    [DllImport("user32.dll")]    public static extern int GetClassName(HandleRef hwnd, StringBuilder lpClassName, int nMaxCount);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool GetClientRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool GetClientRect(HandleRef hWnd, IntPtr rect);    [DllImport("kernel32.dll", CharSet=CharSet.Auto)]    public static extern bool GetComputerName(StringBuilder lpBuffer, int[] nSize);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool GetCursorPos([In, Out] NativeMethods.POINT pt);    public static IntPtr GetDC(HandleRef hWnd);    public static IntPtr GetDCEx(HandleRef hWnd, HandleRef hrgnClip, int flags);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GetDesktopWindow();    [DllImport("gdi32.dll", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    public static extern int GetDeviceCaps(HandleRef hDC, int nIndex);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GetDlgItem(HandleRef hWnd, int nIDDlgItem);    [DllImport("oleaut32.dll", PreserveSig=false)]    public static extern void GetErrorInfo(int reserved, [In, Out] ref IErrorInfo errorInfo);    [return: MarshalAs(UnmanagedType.Bool)]    [DllImport("kernel32.dll")]    public static extern bool GetExitCodeThread(IntPtr hThread, out uint lpExitCode);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GetFocus();    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GetForegroundWindow();    [DllImport("ole32.dll", PreserveSig=false)]    public static extern IntPtr GetHGlobalFromILockBytes(ILockBytes pLkbyt);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int GetKeyboardState(byte[] keystate);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern short GetKeyState(int keyCode);    [DllImport("kernel32.dll", CharSet=CharSet.Auto)]    public static extern int GetLocaleInfo(int Locale, int LCType, StringBuilder lpLCData, int cchData);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr GetMenu(HandleRef hWnd);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int GetMenuItemCount(HandleRef hMenu);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int GetMenuItemID(HandleRef hMenu, int nPos);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool GetMenuItemInfo(HandleRef hMenu, int uItem, bool fByPosition, [In, Out] NativeMethods.MENUITEMINFO_T lpmii);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool GetMenuItemInfo(HandleRef hMenu, int uItem, bool fByPosition, [In, Out] NativeMethods.MENUITEMINFO_T_RW lpmii);    [DllImport("user32.dll", CharSet=CharSet.Ansi, ExactSpelling=true)]    public static extern bool GetMessageA([In, Out] ref NativeMethods.MSG msg, HandleRef hWnd, int uMsgFilterMin, int uMsgFilterMax);    [DllImport("user32.dll", CharSet=CharSet.Unicode, ExactSpelling=true)]    public static extern bool GetMessageW([In, Out] ref NativeMethods.MSG msg, HandleRef hWnd, int uMsgFilterMin, int uMsgFilterMax);    [DllImport("kernel32.dll", CharSet=CharSet.Auto)]    public static extern int GetModuleFileName(HandleRef hModule, StringBuilder buffer, int length);    [DllImport("kernel32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr GetModuleHandle(string modName);    public static int GetObject(HandleRef hObject, NativeMethods.LOGBRUSH lb);    public static int GetObject(HandleRef hObject, NativeMethods.LOGFONT lp);    public static int GetObject(HandleRef hObject, NativeMethods.LOGPEN lp);    [DllImport("gdi32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.BITMAP bm);    [DllImport("gdi32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.LOGBRUSH lb);    [DllImport("gdi32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.LOGFONT lf);    [DllImport("gdi32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern int GetObject(HandleRef hObject, int nSize, int[] nEntries);    [DllImport("gdi32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.LOGPEN lp);    [DllImport("gdi32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern int GetObject(HandleRef hObject, int nSize, ref int nEntries);    [DllImport("gdi32.dll", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    public static extern int GetObjectType(HandleRef hObject);    [DllImport("comdlg32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern bool GetOpenFileName([In, Out] NativeMethods.OPENFILENAME_I ofn);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GetParent(HandleRef hWnd);    [DllImport("kernel32.dll", CharSet=CharSet.Ansi, ExactSpelling=true)]    public static extern IntPtr GetProcAddress(HandleRef hModule, string lpProcName);    [DllImport("user32.dll", ExactSpelling=true)]    public static extern IntPtr GetProcessWindowStation();    public static NativeMethods.RECT[] GetRectsFromRegion(IntPtr hRgn);    [DllImport("gdi32.dll", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    public static extern int GetRegionData(HandleRef hRgn, int size, IntPtr lpRgnData);    [DllImport("comdlg32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern bool GetSaveFileName([In, Out] NativeMethods.OPENFILENAME_I ofn);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool GetScrollInfo(HandleRef hWnd, int fnBar, NativeMethods.SCROLLINFO si);    [DllImport("kernel32.dll", CharSet=CharSet.Auto)]    public static extern uint GetShortPathName(string lpszLongPath, StringBuilder lpszShortPath, uint cchBuffer);    [DllImport("kernel32.dll", CharSet=CharSet.Auto)]    public static extern void GetStartupInfo([In, Out] NativeMethods.STARTUPINFO_I startupinfo_i);    [DllImport("gdi32.dll", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    public static extern IntPtr GetStockObject(int nIndex);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GetSubMenu(HandleRef hwnd, int index);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GetSystemMenu(HandleRef hWnd, bool bRevert);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int GetSystemMetrics(int nIndex);    [DllImport("kernel32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool GetSystemPowerStatus([In, Out] ref NativeMethods.SYSTEM_POWER_STATUS systemPowerStatus);    [DllImport("kernel32.dll", CharSet=CharSet.Auto)]    public static extern void GetTempFileName(string tempDirName, string prefixName, int unique, StringBuilder sb);    [DllImport("advapi32.dll", CharSet=CharSet.Auto)]    public static extern bool GetUserName(StringBuilder lpBuffer, int[] nSize);    [DllImport("user32.dll", SetLastError=true)]    public static extern bool GetUserObjectInformation(HandleRef hObj, int nIndex, [MarshalAs(UnmanagedType.LPStruct)] NativeMethods.USEROBJECTFLAGS pvBuffer, int nLength, ref int lpnLengthNeeded);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GetWindow(HandleRef hWnd, int uCmd);    public static IntPtr GetWindowDC(HandleRef hWnd);    public static IntPtr GetWindowLong(HandleRef hWnd, int nIndex);    [DllImport("user32.dll", EntryPoint="GetWindowLong", CharSet=CharSet.Auto)]    public static extern IntPtr GetWindowLong32(HandleRef hWnd, int nIndex);    [DllImport("user32.dll", EntryPoint="GetWindowLongPtr", CharSet=CharSet.Auto)]    public static extern IntPtr GetWindowLongPtr64(HandleRef hWnd, int nIndex);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int GetWindowPlacement(HandleRef hWnd, ref NativeMethods.WINDOWPLACEMENT placement);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool GetWindowRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern int GetWindowText(HandleRef hWnd, StringBuilder lpString, int nMaxCount);    [DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern short GlobalAddAtom(string atomName);    [DllImport("kernel32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GlobalAlloc(int uFlags, int dwBytes);    [DllImport("kernel32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern short GlobalDeleteAtom(short atom);    [DllImport("kernel32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GlobalFree(HandleRef handle);    [DllImport("kernel32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GlobalLock(HandleRef handle);    [DllImport("kernel32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr GlobalReAlloc(HandleRef handle, int bytes, int flags);    [DllImport("kernel32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int GlobalSize(HandleRef handle);    [DllImport("kernel32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool GlobalUnlock(HandleRef handle);    [DllImport("imm32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr ImmAssociateContext(HandleRef hWnd, HandleRef hIMC);    [DllImport("imm32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr ImmCreateContext();    [DllImport("imm32.dll", CharSet=CharSet.Auto)]    public static extern bool ImmDestroyContext(HandleRef hIMC);    [DllImport("imm32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr ImmGetContext(HandleRef hWnd);    [DllImport("imm32.dll", CharSet=CharSet.Auto)]    public static extern bool ImmGetConversionStatus(HandleRef hIMC, ref int conversion, ref int sentence);    [DllImport("imm32.dll", CharSet=CharSet.Auto)]    public static extern bool ImmGetOpenStatus(HandleRef hIMC);    [DllImport("imm32.dll", CharSet=CharSet.Auto)]    public static extern bool ImmNotifyIME(HandleRef hIMC, int dwAction, int dwIndex, int dwValue);    [DllImport("imm32.dll", CharSet=CharSet.Auto)]    public static extern bool ImmReleaseContext(HandleRef hWnd, HandleRef hIMC);    [DllImport("imm32.dll", CharSet=CharSet.Auto)]    public static extern bool ImmSetConversionStatus(HandleRef hIMC, int conversion, int sentence);    [DllImport("imm32.dll", CharSet=CharSet.Auto)]    public static extern bool ImmSetOpenStatus(HandleRef hIMC, bool open);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool InsertMenuItem(HandleRef hMenu, int uItem, bool fByPosition, NativeMethods.MENUITEMINFO_T lpmii);    [DllImport("user32.dll", EntryPoint="BeginPaint", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern IntPtr IntBeginPaint(HandleRef hWnd, [In, Out] ref NativeMethods.PAINTSTRUCT lpPaint);    [DllImport("kernel32.dll", EntryPoint="CloseHandle", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    private static extern bool IntCloseHandle(HandleRef handle);    [DllImport("user32.dll", EntryPoint="CreateAcceleratorTable", CharSet=CharSet.Auto)]    private static extern IntPtr IntCreateAcceleratorTable(HandleRef pentries, int cCount);    [DllImport("gdi32.dll", EntryPoint="CreateCompatibleDC", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    private static extern IntPtr IntCreateCompatibleDC(HandleRef hDC);    [DllImport("gdi32.dll", EntryPoint="CreateDC", CharSet=CharSet.Auto, SetLastError=true)]    private static extern IntPtr IntCreateDC(string lpszDriver, string lpszDeviceName, string lpszOutput, HandleRef devMode);    [DllImport("gdi32.dll", EntryPoint="CreateIC", CharSet=CharSet.Auto, SetLastError=true)]    private static extern IntPtr IntCreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef lpInitData);    [DllImport("user32.dll", EntryPoint="CreateMenu", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern IntPtr IntCreateMenu();    [DllImport("user32.dll", EntryPoint="CreatePopupMenu", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern IntPtr IntCreatePopupMenu();    [DllImport("user32.dll", EntryPoint="CreateWindowEx", CharSet=CharSet.Auto, SetLastError=true)]    public static extern IntPtr IntCreateWindowEx(int dwExStyle, string lpszClassName, string lpszWindowName, int style, int x, int y, int width, int height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, [MarshalAs(UnmanagedType.AsAny)] object pvParam);    [DllImport("gdi32.dll", EntryPoint="DeleteDC", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    private static extern bool IntDeleteDC(HandleRef hDC);    [DllImport("user32.dll", EntryPoint="DestroyAcceleratorTable", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern bool IntDestroyAcceleratorTable(HandleRef hAccel);    [DllImport("user32.dll", EntryPoint="DestroyCursor", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern bool IntDestroyCursor(HandleRef hCurs);    [DllImport("user32.dll", EntryPoint="DestroyMenu", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern bool IntDestroyMenu(HandleRef hMenu);    [DllImport("user32.dll", EntryPoint="DestroyWindow", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool IntDestroyWindow(HandleRef hWnd);    [DllImport("kernel32.dll", EntryPoint="DuplicateHandle", SetLastError=true, ExactSpelling=true)]    private static extern IntPtr IntDuplicateHandle(HandleRef processSource, HandleRef handleSource, HandleRef processTarget, ref IntPtr handleTarget, int desiredAccess, bool inheritHandle, int options);    [DllImport("user32.dll", EntryPoint="EndPaint", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern bool IntEndPaint(HandleRef hWnd, ref NativeMethods.PAINTSTRUCT lpPaint);    [DllImport("user32.dll", EntryPoint="GetDC", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern IntPtr IntGetDC(HandleRef hWnd);    [DllImport("user32.dll", EntryPoint="GetDCEx", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern IntPtr IntGetDCEx(HandleRef hWnd, HandleRef hrgnClip, int flags);    [DllImport("user32.dll", EntryPoint="GetWindowDC", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern IntPtr IntGetWindowDC(HandleRef hWnd);    [DllImport("kernel32.dll", EntryPoint="MapViewOfFile", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    private static extern IntPtr IntMapViewOfFile(HandleRef hFileMapping, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap);    [DllImport("ole32.dll", EntryPoint="OleInitialize", SetLastError=true, ExactSpelling=true)]    private static extern int IntOleInitialize(int val);    [DllImport("user32.dll", EntryPoint="ReleaseDC", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern int IntReleaseDC(HandleRef hWnd, HandleRef hDC);    [DllImport("user32.dll", EntryPoint="SetWindowRgn", CharSet=CharSet.Auto, ExactSpelling=true)]    private static extern int IntSetWindowRgn(HandleRef hwnd, HandleRef hrgn, bool fRedraw);    [DllImport("kernel32.dll", EntryPoint="UnmapViewOfFile", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    private static extern bool IntUnmapViewOfFile(HandleRef pvBaseAddress);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool IsChild(HandleRef hWndParent, HandleRef hwnd);    internal static bool IsComObject(object o);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool IsDialogMessage(HandleRef hWndDlg, [In, Out] ref NativeMethods.MSG msg);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool IsWindow(HandleRef hWnd);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool IsZoomed(HandleRef hWnd);    [DllImport("user32.dll", EntryPoint="keybd_event", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern void Keybd_event(byte vk, byte scan, int flags, int extrainfo);    [DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern IntPtr LoadLibrary(string libname);    [DllImport("mscoree.dll", CharSet=CharSet.Unicode, ExactSpelling=true)]    public static extern int LoadLibraryShim(string dllName, string version, IntPtr reserved, out IntPtr dllModule);    [DllImport("oleacc.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr LresultFromObject(ref Guid refiid, IntPtr wParam, HandleRef pAcc);    public static IntPtr MapViewOfFile(HandleRef hFileMapping, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int MapWindowPoints(HandleRef hWndFrom, HandleRef hWndTo, [In, Out] NativeMethods.POINT pt, int cPoints);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int MapWindowPoints(HandleRef hWndFrom, HandleRef hWndTo, [In, Out] ref NativeMethods.RECT rect, int cPoints);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int MsgWaitForMultipleObjectsEx(int nCount, IntPtr pHandles, int dwMilliseconds, int dwWakeMask, int dwFlags);    [DllImport("kernel32.dll", CharSet=CharSet.Unicode, SetLastError=true, ExactSpelling=true)]    public static extern int MultiByteToWideChar(int CodePage, int dwFlags, byte[] lpMultiByteStr, int cchMultiByte, char[] lpWideCharStr, int cchWideChar);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern void NotifyWinEvent(int winEvent, HandleRef hwnd, int objType, int objID);    [DllImport("oleaut32.dll", PreserveSig=false)]    public static extern IFont OleCreateFontIndirect(NativeMethods.tagFONTDESC fontdesc, [In] ref Guid refiid);    [DllImport("oleaut32.dll", EntryPoint="OleCreateFontIndirect", ExactSpelling=true, PreserveSig=false)]    public static extern IFont OleCreateIFontIndirect(NativeMethods.FONTDESC fd, ref Guid iid);    [DllImport("oleaut32.dll", EntryPoint="OleCreatePictureIndirect", ExactSpelling=true, PreserveSig=false)]    public static extern IPictureDisp OleCreateIPictureDispIndirect([MarshalAs(UnmanagedType.AsAny)] object pictdesc, ref Guid iid, bool fOwn);    [DllImport("oleaut32.dll", EntryPoint="OleCreatePictureIndirect", ExactSpelling=true, PreserveSig=false)]    public static extern IPicture OleCreateIPictureIndirect([MarshalAs(UnmanagedType.AsAny)] object pictdesc, ref Guid iid, bool fOwn);    [DllImport("oleaut32.dll", PreserveSig=false)]    public static extern IPicture OleCreatePictureIndirect(NativeMethods.PICTDESC pictdesc, [In] ref Guid refiid, bool fOwn);    [DllImport("oleaut32.dll", ExactSpelling=true)]    public static extern void OleCreatePropertyFrameIndirect(NativeMethods.OCPFIPARAMS p);    [DllImport("ole32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int OleFlushClipboard();    [DllImport("ole32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int OleGetClipboard(ref IDataObject data);    public static int OleInitialize();    [DllImport("ole32.dll")]    public static extern int OleLoadFromStream(IStream pStorage, ref Guid iid, out IOleObject pObject);    [DllImport("ole32.dll")]    public static extern int OleSaveToStream(IPersistStream pPersistStream, IStream pStream);    [DllImport("ole32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int OleSetClipboard(IDataObject pDataObj);    [DllImport("ole32.dll", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    public static extern int OleUninitialize();    [DllImport("comdlg32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern bool PageSetupDlg([In, Out] NativeMethods.PAGESETUPDLG lppsd);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool PeekMessage([In, Out] ref NativeMethods.MSG msg, HandleRef hwnd, int msgMin, int msgMax, int remove);    [DllImport("user32.dll", CharSet=CharSet.Ansi)]    public static extern bool PeekMessageA([In, Out] ref NativeMethods.MSG msg, HandleRef hwnd, int msgMin, int msgMax, int remove);    [DllImport("user32.dll", CharSet=CharSet.Unicode)]    public static extern bool PeekMessageW([In, Out] ref NativeMethods.MSG msg, HandleRef hwnd, int msgMin, int msgMax, int remove);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr PostMessage(HandleRef hwnd, int msg, int wparam, int lparam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr PostMessage(HandleRef hwnd, int msg, int wparam, IntPtr lparam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool PostMessage(HandleRef hwnd, int msg, IntPtr wparam, IntPtr lparam);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern void PostQuitMessage(int nExitCode);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern int PostThreadMessage(int id, int msg, IntPtr wparam, IntPtr lparam);    [DllImport("comdlg32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern bool PrintDlg([In, Out] NativeMethods.PRINTDLG lppd);    [DllImport("comdlg32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern int PrintDlgEx([In, Out] NativeMethods.PRINTDLGEX lppdex);    [ReflectionPermission(SecurityAction.Assert, Unrestricted=true)]    public static void PtrToStructure(IntPtr lparam, object data);    [ReflectionPermission(SecurityAction.Assert, Unrestricted=true)]    public static object PtrToStructure(IntPtr lparam, Type cls);    [DllImport("ole32.dll")]    public static extern int ReadClassStg(HandleRef pStg, [In, Out] ref Guid pclsid);    [DllImport("ole32.dll")]    public static extern int ReadClassStg(IStorage pStorage, out Guid clsid);    [DllImport("ole32.dll")]    public static extern int ReadClassStm(IStream pStream, out Guid clsid);    [DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern short RegisterClass(NativeMethods.WNDCLASS_D wc);    [DllImport("ole32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int RegisterDragDrop(HandleRef hwnd, IOleDropTarget target);    internal static int ReleaseComObject(object objToRelease);    public static int ReleaseDC(HandleRef hWnd, HandleRef hDC);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool RemoveMenu(HandleRef hMenu, int uPosition, int uFlags);    [DllImport("ole32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int RevokeDragDrop(HandleRef hwnd);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int ScreenToClient(HandleRef hWnd, [In, Out] NativeMethods.POINT pt);    [DllImport("user32.dll", EntryPoint="SendMessage", CharSet=CharSet.Auto)]    public static extern IntPtr SendCallbackMessage(HandleRef hWnd, int Msg, IntPtr wParam, IntPtr lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendDlgItemMessage(HandleRef hDlg, int nIDDlgItem, int Msg, IntPtr wParam, IntPtr lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    public static extern uint SendInput(uint nInputs, NativeMethods.INPUT[] pInputs, int cbSize);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int Msg, [In, Out, MarshalAs(UnmanagedType.Bool)] ref bool wParam, IntPtr lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int Msg, ref short wParam, ref short lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, ref int wParam, ref int lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int[] wParam, int[] lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, bool wParam, int lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern int SendMessage(HandleRef hWnd, int msg, int wParam, [MarshalAs(UnmanagedType.IUnknown)] out object editOle);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, int lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, HandleRef lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, string lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, StringBuilder lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMATA lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int Msg, int wParam, [In, Out] ref Rectangle lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.HDLAYOUT hdlayout);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] ref NativeMethods.LVFINDINFO lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern int SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.LVHITTESTINFO lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int Msg, int wParam, IntPtr lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] ref NativeMethods.LVITEM lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int Msg, int wParam, [In, Out] ref NativeMethods.RECT lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TBBUTTONINFO lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMAT2A lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMATW lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, int[] lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TBBUTTON lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TV_INSERTSTRUCT lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TV_ITEM lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.CHARRANGE lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.EDITSTREAM lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.EDITSTREAM64 lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.FINDTEXT lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] NativeMethods.LOGFONT lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVBKIMAGE lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVCOLUMN lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVCOLUMN_T lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVGROUP lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVHITTESTINFO lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVINSERTMARK lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] NativeMethods.LVTILEVIEWINFO lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.MCHITTESTINFO lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.MSG lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.PARAFORMAT lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.POINT lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.REPASTESPECIAL lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] NativeMethods.SIZE lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.SYSTEMTIME lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.SYSTEMTIMEARRAY lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TCITEM_T lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TEXTRANGE lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TOOLINFO_T lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TOOLINFO_TOOLTIP lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TV_HITTESTINFO lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, string lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int Msg, IntPtr wParam, NativeMethods.ListViewCompareCallback pfnCompare);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int Msg, IntPtr wParam, [In, Out] ref NativeMethods.RECT lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, HandleRef wParam, int lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.GETTEXTLENGTHEX wParam, int lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.POINT wParam, int lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.POINT wParam, [In, Out] NativeMethods.LVINSERTMARK lParam);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SendMessageTimeout(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam, int flags, int timeout, out IntPtr pdwResult);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr SetActiveWindow(HandleRef hWnd);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr SetCapture(HandleRef hwnd);    public static IntPtr SetClassLong(HandleRef hWnd, int nIndex, IntPtr dwNewLong);    [DllImport("user32.dll", EntryPoint="SetClassLong", CharSet=CharSet.Auto)]    public static extern IntPtr SetClassLongPtr32(HandleRef hwnd, int nIndex, IntPtr dwNewLong);    [DllImport("user32.dll", EntryPoint="SetClassLongPtr", CharSet=CharSet.Auto)]    public static extern IntPtr SetClassLongPtr64(HandleRef hwnd, int nIndex, IntPtr dwNewLong);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr SetCursor(HandleRef hcursor);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool SetCursorPos(int x, int y);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr SetFocus(HandleRef hWnd);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool SetForegroundWindow(HandleRef hWnd);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int SetKeyboardState(byte[] keystate);    [DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    public static extern bool SetLayeredWindowAttributes(HandleRef hwnd, int crKey, byte bAlpha, int dwFlags);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool SetMenu(HandleRef hWnd, HandleRef hMenu);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool SetMenuDefaultItem(HandleRef hwnd, int nIndex, bool pos);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SetMenuItemInfo(HandleRef hMenu, int uItem, bool fByPosition, NativeMethods.MENUITEMINFO_T lpmii);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern IntPtr SetParent(HandleRef hWnd, HandleRef hWndParent);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int SetScrollInfo(HandleRef hWnd, int fnBar, NativeMethods.SCROLLINFO si, bool redraw);    [DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)]    public static extern int SetScrollPos(HandleRef hWnd, int nBar, int nPos, bool bRedraw);    [DllImport("Powrprof.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool SetSuspendState(bool hiberate, bool forceCritical, bool disableWakeEvent);    public static IntPtr SetWindowLong(HandleRef hWnd, int nIndex, HandleRef dwNewLong);    public static IntPtr SetWindowLong(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc);    [DllImport("user32.dll", EntryPoint="SetWindowLong", CharSet=CharSet.Auto)]    public static extern IntPtr SetWindowLongPtr32(HandleRef hWnd, int nIndex, HandleRef dwNewLong);    [DllImport("user32.dll", EntryPoint="SetWindowLong", CharSet=CharSet.Auto)]    public static extern IntPtr SetWindowLongPtr32(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc);    [DllImport("user32.dll", EntryPoint="SetWindowLongPtr", CharSet=CharSet.Auto)]    public static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, HandleRef dwNewLong);    [DllImport("user32.dll", EntryPoint="SetWindowLongPtr", CharSet=CharSet.Auto)]    public static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool SetWindowPlacement(HandleRef hWnd, [In] ref NativeMethods.WINDOWPLACEMENT placement);    public static int SetWindowRgn(HandleRef hwnd, HandleRef hrgn, bool fRedraw);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr SetWindowsHookEx(int hookid, NativeMethods.HookProc pfnhook, HandleRef hinst, int threadid);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SetWindowText(HandleRef hWnd, string text);    [DllImport("shell32.dll", CharSet=CharSet.Auto)]    public static extern int Shell_NotifyIcon(int message, NativeMethods.NOTIFYICONDATA pnid);    [DllImport("shell32.dll", CharSet=CharSet.Auto)]    public static extern IntPtr ShellExecute(HandleRef hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd);    [DllImport("shell32.dll", EntryPoint="ShellExecute", CharSet=CharSet.Auto)]    public static extern IntPtr ShellExecute_NoBFM(HandleRef hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd);    [DllImport("shlwapi.dll", CharSet=CharSet.Unicode, ExactSpelling=true)]    internal static extern uint SHLoadIndirectString(string pszSource, StringBuilder pszOutBuf, uint cchOutBuf, IntPtr ppvReserved);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern int ShowCursor(bool bShow);    internal static int SizeOf(Type t);    [DllImport("ole32.dll", PreserveSig=false)]    public static extern IStorage StgCreateDocfileOnILockBytes(ILockBytes iLockBytes, int grfMode, int reserved);    [DllImport("ole32.dll", PreserveSig=false)]    public static extern IStorage StgOpenStorageOnILockBytes(ILockBytes iLockBytes, IStorage pStgPriority, int grfMode, int sndExcluded, int reserved);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SystemParametersInfo(int nAction, int nParam, [In, Out] NativeMethods.LOGFONT font, int nUpdate);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SystemParametersInfo(int nAction, int nParam, [In, Out] NativeMethods.NONCLIENTMETRICS metrics, int nUpdate);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SystemParametersInfo(int nAction, int nParam, bool[] flag, bool nUpdate);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SystemParametersInfo(int nAction, int nParam, ref bool value, int ignore);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SystemParametersInfo(int nAction, int nParam, ref int value, int ignore);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SystemParametersInfo(int nAction, int nParam, ref NativeMethods.HIGHCONTRAST_I rc, int nUpdate);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SystemParametersInfo(int nAction, int nParam, [In, Out] IntPtr[] rc, int nUpdate);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern bool SystemParametersInfo(int nAction, int nParam, ref NativeMethods.RECT rc, int nUpdate);    internal static void ThrowExceptionForHR(int errorCode);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool TranslateMDISysAccel(IntPtr hWndClient, [In, Out] ref NativeMethods.MSG msg);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool TranslateMessage([In, Out] ref NativeMethods.MSG msg);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern bool UnhookWindowsHookEx(HandleRef hhook);    public static bool UnmapViewOfFile(HandleRef pvBaseAddress);    [DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true)]    public static extern bool UnregisterClass(string className, HandleRef hInstance);    [DllImport("oleaut32.dll", ExactSpelling=true)]    public static extern int VarFormat(ref object pvarIn, HandleRef pstrFormat, int iFirstDay, int iFirstWeek, uint dwFlags, [In, Out] ref IntPtr pbstr);    [DllImport("user32.dll", CharSet=CharSet.Auto)]    public static extern short VkKeyScan(char key);    [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]    public static extern void WaitMessage();    [DllImport("kernel32.dll", CharSet=CharSet.Unicode, ExactSpelling=true)]    public static extern int WideCharToMultiByte(int codePage, int flags, [MarshalAs(UnmanagedType.LPWStr)] string wideStr, int chars, [In, Out] byte[] pOutBytes, int bufferBytes, IntPtr defaultChar, IntPtr pDefaultUsed);    [DllImport("user32.dll", SetLastError=true, ExactSpelling=true)]    public static extern IntPtr WindowFromDC(HandleRef hDC);    public static IntPtr WindowFromPoint(int x, int y);    [DllImport("ole32.dll")]    public static extern int WriteClassStm(IStream pStream, ref Guid clsid);


0 0
原创粉丝点击