Example #1
0
 public IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex)
 {
     if (IntPtr.Size == 8)
     {
         return(PInvoker.GetWindowLongPtr64(hWnd, nIndex));
     }
     else
     {
         return(PInvoker.GetWindowLongPtr(hWnd, nIndex));
     }
 }
Example #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())));
     }
 }
Example #3
0
 public int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount)
 {
     return(PInvoker.GetWindowText(hWnd, lpString, nMaxCount));
 }
Example #4
0
 public uint SHAppBarMessage(int dwMessage, ref APPBARDATA pData) => PInvoker.SHAppBarMessage(dwMessage, ref pData);
Example #5
0
 public IntPtr OpenInputDesktop(uint dwFlags, bool fInherit, uint dwDesiredAccess) => PInvoker.OpenInputDesktop(dwFlags, fInherit, dwDesiredAccess);
Example #6
0
 public Int32 CloseDesktop(Int32 hDesktop) => PInvoker.CloseDesktop(hDesktop);
Example #7
0
 public bool WTSUnRegisterSessionNotification(IntPtr hWnd) => PInvoker.WTSUnRegisterSessionNotification(hWnd);
Example #8
0
 public bool IsWindow(IntPtr hWnd)
 {
     return(PInvoker.IsWindow(hWnd));
 }
Example #9
0
 public void SwitchToThisWindow(IntPtr hWnd, bool fUnknown)
 {
     PInvoker.SwitchToThisWindow(hWnd, fUnknown);
 }
Example #10
0
 public IntPtr FindWindow(string lpClassName, string lpWindowName)
 {
     return(PInvoker.FindWindow(lpClassName, lpWindowName));
 }
Example #11
0
 public bool ShowWindow(IntPtr hWnd, ShowWindowCmd nCmdShow)
 {
     return(PInvoker.ShowWindow(hWnd, nCmdShow));
 }
Example #12
0
 public bool IsWindowVisible(IntPtr hWnd)
 {
     return(PInvoker.IsWindowVisible(hWnd));
 }
Example #13
0
 public int DwmGetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE dwAttribute, out bool pvAttribute, int cbAttribute)
 {
     return(PInvoker.DwmGetWindowAttribute(hwnd, dwAttribute, out pvAttribute, cbAttribute));
 }
Example #14
0
 public bool EnumChildWindows(IntPtr hwndParent, EnumWindowsProc lpEnumFunc, ref EnumExtraData data)
 {
     return(PInvoker.EnumChildWindows(hwndParent, lpEnumFunc, ref data));
 }
Example #15
0
 public IntPtr GetWindow(IntPtr hWnd, GetWindowType uCmd)
 {
     return(PInvoker.GetWindow(hWnd, uCmd));
 }
Example #16
0
 public IntPtr GetConsoleWindow()
 {
     return(PInvoker.GetConsoleWindow());
 }
Example #17
0
 public bool FreeConsole()
 {
     return(PInvoker.FreeConsole());
 }
Example #18
0
 public IntPtr GetForegroundWindow()
 {
     return(PInvoker.GetForegroundWindow());
 }
Example #19
0
 public bool WTSRegisterSessionNotification(IntPtr hWnd, int dwFlags) => PInvoker.WTSRegisterSessionNotification(hWnd, dwFlags);
Example #20
0
 public uint GetCurrentThreadId()
 {
     return(PInvoker.GetCurrentThreadId());
 }
Example #21
0
 public Int32 OpenDesktop(string lpszDesktop, Int32 dwFlags, bool fInherit, Int32 dwDesiredAccess) => PInvoker.OpenDesktop(lpszDesktop, dwFlags, fInherit, dwDesiredAccess);
Example #22
0
 public uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId)
 {
     return(PInvoker.GetWindowThreadProcessId(hWnd, out lpdwProcessId));
 }
Example #23
0
 public Int32 SwitchDesktop(Int32 hDesktop) => PInvoker.SwitchDesktop(hDesktop);
Example #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));
 }
Example #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);
Example #26
0
 public bool AttachThreadInput(uint idAttach, uint idAttachTo, bool fAttach)
 {
     return(PInvoker.AttachThreadInput(idAttach, idAttachTo, fAttach));
 }
Example #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);
Example #28
0
 public IntPtr SetActiveWindow(IntPtr hWnd)
 {
     return(PInvoker.SetActiveWindow(hWnd));
 }
Example #29
0
 public bool AllocConsole()
 {
     return(PInvoker.AllocConsole());
 }
Example #30
0
 public int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount)
 {
     return(PInvoker.GetClassName(hWnd, lpClassName, nMaxCount));
 }