Moved direct WinAPI access into a service
This commit is contained in:
32
Eve-O-Preview/DwmAPI/Interop/User32NativeMethods.cs
Normal file
32
Eve-O-Preview/DwmAPI/Interop/User32NativeMethods.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace EveOPreview.DwmInterop
|
||||
{
|
||||
static class User32NativeMethods
|
||||
{
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetForegroundWindow();
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool SetForegroundWindow(IntPtr window);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
|
||||
|
||||
[DllImport("User32.dll")]
|
||||
public static extern bool ReleaseCapture();
|
||||
|
||||
[DllImport("User32.dll")]
|
||||
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern int GetWindowLong(IntPtr hWnd, int nIndex);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int GetWindowRect(IntPtr hwnd, out RECT rect);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user