ALFA.SystemInfo.GetExoAppWindow C# (CSharp) Метод

GetExoAppWindow() приватный статический Метод

Get the Exo main app window.
private static GetExoAppWindow ( ) : IntPtr
Результат System.IntPtr
        private static IntPtr GetExoAppWindow()
        {
            uint ProcessId = (uint)System.Diagnostics.Process.GetCurrentProcess().Id;
            IntPtr ExoAppWindow = IntPtr.Zero;
            uint WindowProcessId;

            do
            {
                ExoAppWindow = FindWindowEx(IntPtr.Zero, ExoAppWindow, ExoAppClassName, null);

                if (ExoAppWindow == IntPtr.Zero)
                {
                    throw new ApplicationException("Couldn't find ExoAppWindow");
                }

                WindowProcessId = 0;
                GetWindowThreadProcessId(ExoAppWindow, out WindowProcessId);
            } while (WindowProcessId != ProcessId);

            return ExoAppWindow;
        }