System.Diagnostics.MainWindowFinder.EnumWindowsCallback C# (CSharp) Method

EnumWindowsCallback() private method

private EnumWindowsCallback ( IntPtr handle, IntPtr extraParameter ) : bool
handle IntPtr
extraParameter IntPtr
return bool
        private bool EnumWindowsCallback(IntPtr handle, IntPtr extraParameter) {
            int processId;
            Interop.User32.GetWindowThreadProcessId(handle, out processId);

            if (processId == _processId) {
                if (IsMainWindow(handle)) {
                    _bestHandle = handle;
                    return false;
                }
            }
            return true;
        }
    }