146 references to SafeNativeMethods
UIAutomationClient (146)
MS\Internal\Automation\BoundingRectTracker.cs (1)
76if (!SafeNativeMethods.IsWindowVisible(NativeMethods.HWND.Cast( hwnd )))
MS\Internal\Automation\ClickablePoint.cs (2)
33if (SafeNativeMethods.MonitorFromRect( ref winRect, SafeNativeMethods.MONITOR_DEFAULTTONULL ) == IntPtr.Zero)
MS\Internal\Automation\EventListenerClientSide.cs (1)
64uint eventTime = SafeNativeMethods.GetTickCount();
MS\Internal\Automation\FocusTracker.cs (3)
253if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.HWND.Cast(hwndCur))) 313SafeNativeMethods.GUITHREADINFO guiThreadInfo = new SafeNativeMethods.GUITHREADINFO();
MS\Internal\Automation\HwndProxyElementProvider.cs (119)
97int id = Misc.GetWindowLong(_hwnd, SafeNativeMethods.GWL_ID); 144if (SafeNativeMethods.GetWindowThreadProcessId(_hwnd, out pid) == 0) 158SafeNativeMethods.GUITHREADINFO gti = new SafeNativeMethods.GUITHREADINFO (); 165return (gti.hwndFocus == _hwnd) || (SafeNativeMethods.IsChild(_hwnd, gti.hwndFocus)); 230if (IsTopLevelWindow(_hwnd) && SafeNativeMethods.IsIconic(_hwnd)) 290if ( !SafeNativeMethods.IsWindow( _hwnd ) ) 298if ( IsBitSet(GetWindowStyle(), SafeNativeMethods.WS_DISABLED) ) 413int guiThreadId = SafeNativeMethods.GetWindowThreadProcessId(_hwnd, out pid); 491if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 496return IsBitSet(style, SafeNativeMethods.WS_MAXIMIZEBOX); 510if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 515return IsBitSet(style, SafeNativeMethods.WS_MINIMIZEBOX); 523if (!SafeNativeMethods.IsWindow(_hwnd)) 533return IsBitSet(GetWindowStyle(hwndOwner), SafeNativeMethods.WS_DISABLED); 545if ( IsBitSet(style, SafeNativeMethods.WS_MAXIMIZE) ) 549else if ( IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) ) 578if ( SafeNativeMethods.IsWindow( _hwnd ) ) 592if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 608return IsBitSet(GetWindowExStyle(), SafeNativeMethods.WS_EX_TOPMOST); 628if ( IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_MDICHILD) ) 633NativeMethods.HWND hwndParent = SafeNativeMethods.GetAncestor(NativeMethods.HWND.Cast(_hwnd), SafeNativeMethods.GA_PARENT); 650int dx = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CXHSCROLL); 651int dy = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CYHSCROLL); 711if ( IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) ) 770if ( !SafeNativeMethods.IsWindow( _hwnd ) ) 782int x = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CXMAXTRACK); 783int y = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CYMAXTRACK); 834if (!SafeNativeMethods.IsWindow(_hwnd)) 852if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 858if (IsBitSet(style, SafeNativeMethods.WS_SYSMENU)) 868if (IsBitSet(style, SafeNativeMethods.WS_MAXIMIZE)) 876if ( IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) && !IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_MDICHILD) ) 881return IsBitSet(style, SafeNativeMethods.WS_BORDER) && IsBitSet(style, SafeNativeMethods.WS_DLGFRAME); 897if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 903if (IsBitSet(style, SafeNativeMethods.WS_SYSMENU)) 913if ( IsBitSet(style, SafeNativeMethods.WS_MAXIMIZE) || IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) ) 918return IsBitSet(style, SafeNativeMethods.WS_THICKFRAME); 927if (!SafeNativeMethods.IsWindow(_hwnd)) 950NativeMethods.HWND desktop = SafeNativeMethods.GetDesktopWindow(); 1022if (IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_APPWINDOW)) 1034bool hasTitleBar = IsBitSet( style, SafeNativeMethods.WS_BORDER ) && IsBitSet( style, SafeNativeMethods.WS_DLGFRAME ); 1040if (IsBitSet( extendedStyle, SafeNativeMethods.WS_EX_TOOLWINDOW ) && !hasTitleBar ) 1043if (IsBitSet(style, SafeNativeMethods.WS_POPUP) && !hasTitleBar) 1047if (!IsTopLevelWindow(hwnd) && !IsBitSet( extendedStyle, SafeNativeMethods.WS_EX_MDICHILD ) ) 1069if ( IsBitSet(style, SafeNativeMethods.WS_THICKFRAME) ) 1073if ( IsBitSet(style, SafeNativeMethods.WS_BORDER) && IsBitSet(style, SafeNativeMethods.WS_DLGFRAME) ) 1125private const int ScanPrev = SafeNativeMethods.GW_HWNDPREV; 1126private const int ScanNext = SafeNativeMethods.GW_HWNDNEXT; 1170NativeMethods.HWND desktop = SafeNativeMethods.GetDesktopWindow(); 1171NativeMethods.HWND scan = Misc.GetWindow(desktop, SafeNativeMethods.GW_CHILD); 1175scan = Misc.GetWindow(scan, SafeNativeMethods.GW_HWNDLAST); 1194NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT); 1197if (parent == SafeNativeMethods.GetDesktopWindow()) 1229hwnd = Misc.GetWindow(hwndOwner, SafeNativeMethods.GW_CHILD); 1271NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT); 1296hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD); 1318NativeMethods.HWND hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD); 1321hwnd = Misc.GetWindow(hwnd, SafeNativeMethods.GW_HWNDLAST); 1399for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD); 1401hChild = Misc.GetWindow(hChild, SafeNativeMethods.GW_HWNDNEXT)) 1431if( ! SafeNativeMethods.IsWindowEnabled( hwnd ) ) 1434hwnd = SafeNativeMethods.GetAncestor( hwnd, SafeNativeMethods.GA_PARENT ); 1458if(!SafeNativeMethods.IsWindowVisible(hwnd)) 1490if (SafeNativeMethods.DwmGetWindowAttribute(hwnd, SafeNativeMethods.DWMWA_CLOAKED, ref dwCloaked, sizeof(int)) == 0) 1503return SafeNativeMethods.GetAncestor( hwnd, SafeNativeMethods.GA_PARENT ) == SafeNativeMethods.GetDesktopWindow(); 1508NativeMethods.HWND hwndOwner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER); 1569int thread = SafeNativeMethods.GetWindowThreadProcessId(_hwnd, out process); 1575SafeNativeMethods.EnumThreadWndProc enumWindows = new SafeNativeMethods.EnumThreadWndProc(EnumWindows); 1580bool noModalWindow = SafeNativeMethods.EnumThreadWindows(thread, enumWindows, _hwnd); 1590if ( IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_DLGMODALFRAME) ) 1592NativeMethods.HWND owner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER); 1628SafeNativeMethods.GUITHREADINFO gui = new SafeNativeMethods.GUITHREADINFO(); 1634return (SafeNativeMethods.GUI_INMENUMODE == (gui.dwFlags & SafeNativeMethods.GUI_INMENUMODE)); 1728for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD); 1730hChild = Misc.GetWindow(hChild, SafeNativeMethods.GW_HWNDNEXT)) 1749NativeMethods.HWND hwndTopLevel = SafeNativeMethods.GetAncestor(hChild, SafeNativeMethods.GA_ROOT); 1753SafeNativeMethods.PhysicalToLogicalPoint(hwndTopLevel, ref pt); 1773if ((style & SafeNativeMethods.WS_CHILD) != 0 1774&& (style & SafeNativeMethods.WS_DISABLED) != 0) 1798if( ( exStyle & SafeNativeMethods.WS_EX_LAYERED ) != 0 1799&& ( exStyle & SafeNativeMethods.WS_EX_TRANSPARENT ) != 0 ) 1806if (SafeNativeMethods.GetWindowRgn(hChild.h, hrgn) == SafeNativeMethods.COMPLEXREGION) 1809if (!SafeNativeMethods.PtInRegion(hrgn, (int)xLogical - rc.left, (int)yLogical - rc.top)) 1899hwnd = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT); 1961int style = Misc.GetWindowLong(hwnd, SafeNativeMethods.GWL_STYLE); 1972int exstyle = Misc.GetWindowLong(hwnd, SafeNativeMethods.GWL_EXSTYLE); 1990if (IsBitSet(exStyle, SafeNativeMethods.WS_EX_MDICHILD)) 1992NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT); 2088SafeNativeMethods.GUITHREADINFO gti = new SafeNativeMethods.GUITHREADINFO(); 2104SafeNativeMethods.GUITHREADINFO gti = new SafeNativeMethods.GUITHREADINFO(); 2107if ((gti.dwFlags & SafeNativeMethods.GUI_INMENUMODE) != 0 2108|| (gti.dwFlags & SafeNativeMethods.GUI_SYSTEMMENUMODE) != 0 2109|| (gti.dwFlags & SafeNativeMethods.GUI_POPUPMENUMODE) != 0)
MS\Internal\Automation\MenuTracker.cs (2)
60if( !SafeNativeMethods.IsWindow( nativeHwnd ) ) 64if( !SafeNativeMethods.IsWindowVisible( nativeHwnd ) )
MS\Internal\Automation\Misc.cs (7)
271IntPtr result = SafeNativeMethods.CreateRectRgn(left, top, right, bottom); 310bool result = SafeNativeMethods.GetClientRect(hwnd, out rc); 321internal static bool GetGUIThreadInfo(int idThread, ref SafeNativeMethods.GUITHREADINFO guiThreadInfo) 325bool result = SafeNativeMethods.GetGUIThreadInfo(0, ref guiThreadInfo); 358int result = SafeNativeMethods.GetModuleFileNameEx(hProcess, hModule, buffer, length); 439bool result = SafeNativeMethods.GetWindowRect(hwnd, out rc); 452short result = SafeNativeMethods.GlobalAddAtom(lpString);
MS\Internal\Automation\ProxyManager.cs (5)
223int result = SafeNativeMethods.GetClassName(hwnd, str, NativeMethods.MAX_PATH); 237int result = SafeNativeMethods.RealGetWindowClass(hwnd, str, NativeMethods.MAX_PATH); 279NativeMethods.HWND hwndParent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT); 297int instance = Misc.GetWindowLong(hwnd, SafeNativeMethods.GWL_HINSTANCE);
MS\Internal\Automation\SafeProcessHandle.cs (1)
23if (SafeNativeMethods.GetWindowThreadProcessId(hwnd, out processId) == 0)
MS\Internal\Automation\WindowHideOrCloseTracker.cs (1)
62if (eventId == NativeMethods.EVENT_OBJECT_HIDE && !SafeNativeMethods.IsWindow( nativeHwnd ))
MS\Internal\Automation\WindowInteractionStateTracker.cs (1)
76if (!SafeNativeMethods.IsWindow(nativeHwnd))
MS\Internal\Automation\WindowShowOrOpenTracker.cs (2)
61if (! SafeNativeMethods.IsWindow( nativeHwnd )) 66if (! SafeNativeMethods.IsWindowVisible( nativeHwnd ))
MS\Internal\Automation\WindowVisualStateTracker.cs (1)
76if (!SafeNativeMethods.IsWindow(nativeHwnd))