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