diff --git a/src/Tgstation.Server.Host/NativeMethods.cs b/src/Tgstation.Server.Host/NativeMethods.cs
index 398185ab2a..afe778312a 100644
--- a/src/Tgstation.Server.Host/NativeMethods.cs
+++ b/src/Tgstation.Server.Host/NativeMethods.cs
@@ -1,5 +1,6 @@
using System;
using System.Runtime.InteropServices;
+using System.Text;
namespace Tgstation.Server.Host
{
@@ -8,6 +9,42 @@ namespace Tgstation.Server.Host
///
static class NativeMethods
{
+ ///
+ /// See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getwindowthreadprocessid
+ ///
+ [DllImport("user32.dll")]
+ public static extern int GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);
+
+ ///
+ /// See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-findwindoww
+ ///
+ [DllImport("user32.dll", CharSet = CharSet.Unicode)]
+ public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
+
+ ///
+ /// See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-sendmessage
+ ///
+ [DllImport("user32.dll")]
+ public static extern int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);
+
+ ///
+ /// See https://msdn.microsoft.com/en-us/library/ms633493(v=VS.85).aspx
+ ///
+ public delegate bool EnumWindowProc(IntPtr hwnd, IntPtr lParam);
+
+ ///
+ /// See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-enumchildwindows
+ ///
+ [DllImport("user32")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ public static extern bool EnumChildWindows(IntPtr window, EnumWindowProc callback, IntPtr lParam);
+
+ ///
+ /// See https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getwindowtextw
+ ///
+ [DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
+ public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
+
///
/// See https://msdn.microsoft.com/en-us/library/windows/desktop/aa378184(v=vs.85).aspx
///