146 references to SafeNativeMethods
UIAutomationClient (146)
MS\Internal\Automation\BoundingRectTracker.cs (1)
77if (!SafeNativeMethods.IsWindowVisible(NativeMethods.HWND.Cast( hwnd )))
MS\Internal\Automation\ClickablePoint.cs (2)
34if (SafeNativeMethods.MonitorFromRect( ref winRect, SafeNativeMethods.MONITOR_DEFAULTTONULL ) == IntPtr.Zero)
MS\Internal\Automation\EventListenerClientSide.cs (1)
65uint eventTime = SafeNativeMethods.GetTickCount();
MS\Internal\Automation\FocusTracker.cs (3)
254if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.HWND.Cast(hwndCur))) 314SafeNativeMethods.GUITHREADINFO guiThreadInfo = new SafeNativeMethods.GUITHREADINFO();
MS\Internal\Automation\HwndProxyElementProvider.cs (119)
98int id = Misc.GetWindowLong(_hwnd, SafeNativeMethods.GWL_ID); 145if (SafeNativeMethods.GetWindowThreadProcessId(_hwnd, out pid) == 0) 159SafeNativeMethods.GUITHREADINFO gti = new SafeNativeMethods.GUITHREADINFO (); 166return (gti.hwndFocus == _hwnd) || (SafeNativeMethods.IsChild(_hwnd, gti.hwndFocus)); 231if (IsTopLevelWindow(_hwnd) && SafeNativeMethods.IsIconic(_hwnd)) 291if ( !SafeNativeMethods.IsWindow( _hwnd ) ) 299if ( IsBitSet(GetWindowStyle(), SafeNativeMethods.WS_DISABLED) ) 414int guiThreadId = SafeNativeMethods.GetWindowThreadProcessId(_hwnd, out pid); 492if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 497return IsBitSet(style, SafeNativeMethods.WS_MAXIMIZEBOX); 511if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 516return IsBitSet(style, SafeNativeMethods.WS_MINIMIZEBOX); 524if (!SafeNativeMethods.IsWindow(_hwnd)) 534return IsBitSet(GetWindowStyle(hwndOwner), SafeNativeMethods.WS_DISABLED); 546if ( IsBitSet(style, SafeNativeMethods.WS_MAXIMIZE) ) 550else if ( IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) ) 579if ( SafeNativeMethods.IsWindow( _hwnd ) ) 593if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 609return IsBitSet(GetWindowExStyle(), SafeNativeMethods.WS_EX_TOPMOST); 629if ( IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_MDICHILD) ) 634NativeMethods.HWND hwndParent = SafeNativeMethods.GetAncestor(NativeMethods.HWND.Cast(_hwnd), SafeNativeMethods.GA_PARENT); 651int dx = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CXHSCROLL); 652int dy = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CYHSCROLL); 712if ( IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) ) 771if ( !SafeNativeMethods.IsWindow( _hwnd ) ) 783int x = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CXMAXTRACK); 784int y = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CYMAXTRACK); 835if (!SafeNativeMethods.IsWindow(_hwnd)) 853if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 859if (IsBitSet(style, SafeNativeMethods.WS_SYSMENU)) 869if (IsBitSet(style, SafeNativeMethods.WS_MAXIMIZE)) 877if ( IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) && !IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_MDICHILD) ) 882return IsBitSet(style, SafeNativeMethods.WS_BORDER) && IsBitSet(style, SafeNativeMethods.WS_DLGFRAME); 898if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 904if (IsBitSet(style, SafeNativeMethods.WS_SYSMENU)) 914if ( IsBitSet(style, SafeNativeMethods.WS_MAXIMIZE) || IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) ) 919return IsBitSet(style, SafeNativeMethods.WS_THICKFRAME); 928if (!SafeNativeMethods.IsWindow(_hwnd)) 951NativeMethods.HWND desktop = SafeNativeMethods.GetDesktopWindow(); 1023if (IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_APPWINDOW)) 1035bool hasTitleBar = IsBitSet( style, SafeNativeMethods.WS_BORDER ) && IsBitSet( style, SafeNativeMethods.WS_DLGFRAME ); 1041if (IsBitSet( extendedStyle, SafeNativeMethods.WS_EX_TOOLWINDOW ) && !hasTitleBar ) 1044if (IsBitSet(style, SafeNativeMethods.WS_POPUP) && !hasTitleBar) 1048if (!IsTopLevelWindow(hwnd) && !IsBitSet( extendedStyle, SafeNativeMethods.WS_EX_MDICHILD ) ) 1070if ( IsBitSet(style, SafeNativeMethods.WS_THICKFRAME) ) 1074if ( IsBitSet(style, SafeNativeMethods.WS_BORDER) && IsBitSet(style, SafeNativeMethods.WS_DLGFRAME) ) 1126private const int ScanPrev = SafeNativeMethods.GW_HWNDPREV; 1127private const int ScanNext = SafeNativeMethods.GW_HWNDNEXT; 1171NativeMethods.HWND desktop = SafeNativeMethods.GetDesktopWindow(); 1172NativeMethods.HWND scan = Misc.GetWindow(desktop, SafeNativeMethods.GW_CHILD); 1176scan = Misc.GetWindow(scan, SafeNativeMethods.GW_HWNDLAST); 1195NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT); 1198if (parent == SafeNativeMethods.GetDesktopWindow()) 1230hwnd = Misc.GetWindow(hwndOwner, SafeNativeMethods.GW_CHILD); 1272NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT); 1297hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD); 1319NativeMethods.HWND hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD); 1322hwnd = Misc.GetWindow(hwnd, SafeNativeMethods.GW_HWNDLAST); 1400for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD); 1402hChild = Misc.GetWindow(hChild, SafeNativeMethods.GW_HWNDNEXT)) 1432if( ! SafeNativeMethods.IsWindowEnabled( hwnd ) ) 1435hwnd = SafeNativeMethods.GetAncestor( hwnd, SafeNativeMethods.GA_PARENT ); 1459if(!SafeNativeMethods.IsWindowVisible(hwnd)) 1491if (SafeNativeMethods.DwmGetWindowAttribute(hwnd, SafeNativeMethods.DWMWA_CLOAKED, ref dwCloaked, sizeof(int)) == 0) 1504return SafeNativeMethods.GetAncestor( hwnd, SafeNativeMethods.GA_PARENT ) == SafeNativeMethods.GetDesktopWindow(); 1509NativeMethods.HWND hwndOwner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER); 1570int thread = SafeNativeMethods.GetWindowThreadProcessId(_hwnd, out process); 1576SafeNativeMethods.EnumThreadWndProc enumWindows = new SafeNativeMethods.EnumThreadWndProc(EnumWindows); 1581bool noModalWindow = SafeNativeMethods.EnumThreadWindows(thread, enumWindows, _hwnd); 1591if ( IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_DLGMODALFRAME) ) 1593NativeMethods.HWND owner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER); 1629SafeNativeMethods.GUITHREADINFO gui = new SafeNativeMethods.GUITHREADINFO(); 1635return (SafeNativeMethods.GUI_INMENUMODE == (gui.dwFlags & SafeNativeMethods.GUI_INMENUMODE)); 1729for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD); 1731hChild = Misc.GetWindow(hChild, SafeNativeMethods.GW_HWNDNEXT)) 1750NativeMethods.HWND hwndTopLevel = SafeNativeMethods.GetAncestor(hChild, SafeNativeMethods.GA_ROOT); 1754SafeNativeMethods.PhysicalToLogicalPoint(hwndTopLevel, ref pt); 1774if ((style & SafeNativeMethods.WS_CHILD) != 0 1775&& (style & SafeNativeMethods.WS_DISABLED) != 0) 1799if( ( exStyle & SafeNativeMethods.WS_EX_LAYERED ) != 0 1800&& ( exStyle & SafeNativeMethods.WS_EX_TRANSPARENT ) != 0 ) 1807if (SafeNativeMethods.GetWindowRgn(hChild.h, hrgn) == SafeNativeMethods.COMPLEXREGION) 1810if (!SafeNativeMethods.PtInRegion(hrgn, (int)xLogical - rc.left, (int)yLogical - rc.top)) 1900hwnd = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT); 1962int style = Misc.GetWindowLong(hwnd, SafeNativeMethods.GWL_STYLE); 1973int exstyle = Misc.GetWindowLong(hwnd, SafeNativeMethods.GWL_EXSTYLE); 1991if (IsBitSet(exStyle, SafeNativeMethods.WS_EX_MDICHILD)) 1993NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT); 2089SafeNativeMethods.GUITHREADINFO gti = new SafeNativeMethods.GUITHREADINFO(); 2105SafeNativeMethods.GUITHREADINFO gti = new SafeNativeMethods.GUITHREADINFO(); 2108if ((gti.dwFlags & SafeNativeMethods.GUI_INMENUMODE) != 0 2109|| (gti.dwFlags & SafeNativeMethods.GUI_SYSTEMMENUMODE) != 0 2110|| (gti.dwFlags & SafeNativeMethods.GUI_POPUPMENUMODE) != 0)
MS\Internal\Automation\MenuTracker.cs (2)
61if( !SafeNativeMethods.IsWindow( nativeHwnd ) ) 65if( !SafeNativeMethods.IsWindowVisible( nativeHwnd ) )
MS\Internal\Automation\Misc.cs (7)
272IntPtr result = SafeNativeMethods.CreateRectRgn(left, top, right, bottom); 311bool result = SafeNativeMethods.GetClientRect(hwnd, out rc); 322internal static bool GetGUIThreadInfo(int idThread, ref SafeNativeMethods.GUITHREADINFO guiThreadInfo) 326bool result = SafeNativeMethods.GetGUIThreadInfo(0, ref guiThreadInfo); 359int result = SafeNativeMethods.GetModuleFileNameEx(hProcess, hModule, buffer, length); 440bool result = SafeNativeMethods.GetWindowRect(hwnd, out rc); 453short result = SafeNativeMethods.GlobalAddAtom(lpString);
MS\Internal\Automation\ProxyManager.cs (5)
224int result = SafeNativeMethods.GetClassName(hwnd, str, NativeMethods.MAX_PATH); 238int result = SafeNativeMethods.RealGetWindowClass(hwnd, str, NativeMethods.MAX_PATH); 280NativeMethods.HWND hwndParent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT); 298int instance = Misc.GetWindowLong(hwnd, SafeNativeMethods.GWL_HINSTANCE);
MS\Internal\Automation\SafeProcessHandle.cs (1)
24if (SafeNativeMethods.GetWindowThreadProcessId(hwnd, out processId) == 0)
MS\Internal\Automation\WindowHideOrCloseTracker.cs (1)
63if (eventId == NativeMethods.EVENT_OBJECT_HIDE && !SafeNativeMethods.IsWindow( nativeHwnd ))
MS\Internal\Automation\WindowInteractionStateTracker.cs (1)
77if (!SafeNativeMethods.IsWindow(nativeHwnd))
MS\Internal\Automation\WindowShowOrOpenTracker.cs (2)
62if (! SafeNativeMethods.IsWindow( nativeHwnd )) 67if (! SafeNativeMethods.IsWindowVisible( nativeHwnd ))
MS\Internal\Automation\WindowVisualStateTracker.cs (1)
77if (!SafeNativeMethods.IsWindow(nativeHwnd))