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;
}
}