internal extern static uint GetWindowThreadProcessId(IntPtr hwnd, out uint lpdwProcessId); [DllImport("User32.dll", CallingConvention = CallingConvention.StdCall, SetLastError = true)]