Ejemplo n.º 1
0
 public IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex)
 {
     if (IntPtr.Size == 8)
     {
         return(PInvoker.GetWindowLongPtr64(hWnd, nIndex));
     }
     else
     {
         return(PInvoker.GetWindowLongPtr(hWnd, nIndex));
     }
 }
Ejemplo n.º 2
0
 // This helper static method is required because the 32-bit version of user32.dll does not contain this API
 // (on any versions of Windows), so linking the method will fail at run-time. The bridge dispatches the request
 // to the correct function (GetWindowLong in 32-bit mode and GetWindowLongPtr in 64-bit mode)
 public IntPtr SetWindowLongPtr(HandleRef hWnd, int nIndex, IntPtr dwNewLong)
 {
     if (IntPtr.Size == 8)
     {
         return(PInvoker.SetWindowLongPtr64(hWnd, nIndex, dwNewLong));
     }
     else
     {
         return(new IntPtr(PInvoker.SetWindowLong32(hWnd, nIndex, dwNewLong.ToInt32())));
     }
 }
Ejemplo n.º 3
0
 public int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount)
 {
     return(PInvoker.GetWindowText(hWnd, lpString, nMaxCount));
 }
Ejemplo n.º 4
0
 public uint SHAppBarMessage(int dwMessage, ref APPBARDATA pData) => PInvoker.SHAppBarMessage(dwMessage, ref pData);
Ejemplo n.º 5
0
 public IntPtr OpenInputDesktop(uint dwFlags, bool fInherit, uint dwDesiredAccess) => PInvoker.OpenInputDesktop(dwFlags, fInherit, dwDesiredAccess);
Ejemplo n.º 6
0
 public Int32 CloseDesktop(Int32 hDesktop) => PInvoker.CloseDesktop(hDesktop);
Ejemplo n.º 7
0
 public bool WTSUnRegisterSessionNotification(IntPtr hWnd) => PInvoker.WTSUnRegisterSessionNotification(hWnd);
Ejemplo n.º 8
0
 public bool IsWindow(IntPtr hWnd)
 {
     return(PInvoker.IsWindow(hWnd));
 }
Ejemplo n.º 9
0
 public void SwitchToThisWindow(IntPtr hWnd, bool fUnknown)
 {
     PInvoker.SwitchToThisWindow(hWnd, fUnknown);
 }
Ejemplo n.º 10
0
 public IntPtr FindWindow(string lpClassName, string lpWindowName)
 {
     return(PInvoker.FindWindow(lpClassName, lpWindowName));
 }
Ejemplo n.º 11
0
 public bool ShowWindow(IntPtr hWnd, ShowWindowCmd nCmdShow)
 {
     return(PInvoker.ShowWindow(hWnd, nCmdShow));
 }
Ejemplo n.º 12
0
 public bool IsWindowVisible(IntPtr hWnd)
 {
     return(PInvoker.IsWindowVisible(hWnd));
 }
Ejemplo n.º 13
0
 public int DwmGetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE dwAttribute, out bool pvAttribute, int cbAttribute)
 {
     return(PInvoker.DwmGetWindowAttribute(hwnd, dwAttribute, out pvAttribute, cbAttribute));
 }
Ejemplo n.º 14
0
 public bool EnumChildWindows(IntPtr hwndParent, EnumWindowsProc lpEnumFunc, ref EnumExtraData data)
 {
     return(PInvoker.EnumChildWindows(hwndParent, lpEnumFunc, ref data));
 }
Ejemplo n.º 15
0
 public IntPtr GetWindow(IntPtr hWnd, GetWindowType uCmd)
 {
     return(PInvoker.GetWindow(hWnd, uCmd));
 }
Ejemplo n.º 16
0
 public IntPtr GetConsoleWindow()
 {
     return(PInvoker.GetConsoleWindow());
 }
Ejemplo n.º 17
0
 public bool FreeConsole()
 {
     return(PInvoker.FreeConsole());
 }
Ejemplo n.º 18
0
 public IntPtr GetForegroundWindow()
 {
     return(PInvoker.GetForegroundWindow());
 }
Ejemplo n.º 19
0
 public bool WTSRegisterSessionNotification(IntPtr hWnd, int dwFlags) => PInvoker.WTSRegisterSessionNotification(hWnd, dwFlags);
Ejemplo n.º 20
0
 public uint GetCurrentThreadId()
 {
     return(PInvoker.GetCurrentThreadId());
 }
Ejemplo n.º 21
0
 public Int32 OpenDesktop(string lpszDesktop, Int32 dwFlags, bool fInherit, Int32 dwDesiredAccess) => PInvoker.OpenDesktop(lpszDesktop, dwFlags, fInherit, dwDesiredAccess);
Ejemplo n.º 22
0
 public uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId)
 {
     return(PInvoker.GetWindowThreadProcessId(hWnd, out lpdwProcessId));
 }
Ejemplo n.º 23
0
 public Int32 SwitchDesktop(Int32 hDesktop) => PInvoker.SwitchDesktop(hDesktop);
Ejemplo n.º 24
0
 // When you don't want the ProcessId, use this overload and pass IntPtr.Zero for the second parameter
 public uint GetWindowThreadProcessId(IntPtr hWnd, IntPtr ProcessId)
 {
     return(PInvoker.GetWindowThreadProcessId(hWnd, ProcessId));
 }
Ejemplo n.º 25
0
 public bool GetUserObjectInformation(IntPtr hObj, int nIndex, [Out] byte[] pvInfo, uint nLength, out uint lpnLengthNeeded) => PInvoker.GetUserObjectInformation(hObj, nIndex, pvInfo, nLength, out lpnLengthNeeded);
Ejemplo n.º 26
0
 public bool AttachThreadInput(uint idAttach, uint idAttachTo, bool fAttach)
 {
     return(PInvoker.AttachThreadInput(idAttach, idAttachTo, fAttach));
 }
Ejemplo n.º 27
0
 public bool MoveWindow(IntPtr hWnd, int x, int y, int cx, int cy, bool repaint) => PInvoker.MoveWindow(hWnd, x, y, cx, cy, repaint);
Ejemplo n.º 28
0
 public IntPtr SetActiveWindow(IntPtr hWnd)
 {
     return(PInvoker.SetActiveWindow(hWnd));
 }
Ejemplo n.º 29
0
 public bool AllocConsole()
 {
     return(PInvoker.AllocConsole());
 }
Ejemplo n.º 30
0
 public int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount)
 {
     return(PInvoker.GetClassName(hWnd, lpClassName, nMaxCount));
 }