Dev2.Activities.ModalChecker.WindowEnum C# (CSharp) Method

WindowEnum() private method

private WindowEnum ( IntPtr hWnd, int lParam ) : int
hWnd System.IntPtr
lParam int
return int
        private int WindowEnum(IntPtr hWnd, int lParam)
        // ReSharper restore UnusedMethodReturnValue.Local
        {
            IntPtr processId;

            GetWindowThreadProcessId(hWnd, out processId);
            if(processId.ToInt32() != _process.Id)
                return 1;
            uint style = GetWindowLong(hWnd, GWL_EXSTYLE);
            if((style & WS_EX_DLGMODALFRAME) != 0)
            {
                _waiting = true;
                return 0; // stop searching further
            }
            return 1;
        }
    }