146 references to SafeNativeMethods
UIAutomationClient (146)
MS\Internal\Automation\BoundingRectTracker.cs (1)
87if (!SafeNativeMethods.IsWindowVisible(NativeMethods.HWND.Cast( hwnd )))
MS\Internal\Automation\ClickablePoint.cs (2)
45if (SafeNativeMethods.MonitorFromRect( ref winRect, SafeNativeMethods.MONITOR_DEFAULTTONULL ) == IntPtr.Zero)
MS\Internal\Automation\EventListenerClientSide.cs (1)
75uint eventTime = SafeNativeMethods.GetTickCount();
MS\Internal\Automation\FocusTracker.cs (3)
262if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.HWND.Cast(hwndCur))) 322SafeNativeMethods.GUITHREADINFO guiThreadInfo = new SafeNativeMethods.GUITHREADINFO();
MS\Internal\Automation\HwndProxyElementProvider.cs (119)
114int id = Misc.GetWindowLong(_hwnd, SafeNativeMethods.GWL_ID); 163if (SafeNativeMethods.GetWindowThreadProcessId(_hwnd, out pid) == 0) 177SafeNativeMethods.GUITHREADINFO gti = new SafeNativeMethods.GUITHREADINFO (); 184return (gti.hwndFocus == _hwnd) || (SafeNativeMethods.IsChild(_hwnd, gti.hwndFocus)); 248if (IsTopLevelWindow(_hwnd) && SafeNativeMethods.IsIconic(_hwnd)) 308if ( !SafeNativeMethods.IsWindow( _hwnd ) ) 316if ( IsBitSet(GetWindowStyle(), SafeNativeMethods.WS_DISABLED) ) 433int guiThreadId = SafeNativeMethods.GetWindowThreadProcessId(_hwnd, out pid); 511if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 516return IsBitSet(style, SafeNativeMethods.WS_MAXIMIZEBOX); 530if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 535return IsBitSet(style, SafeNativeMethods.WS_MINIMIZEBOX); 543if (!SafeNativeMethods.IsWindow(_hwnd)) 555return IsBitSet(GetWindowStyle(hwndOwner), SafeNativeMethods.WS_DISABLED); 567if ( IsBitSet(style, SafeNativeMethods.WS_MAXIMIZE) ) 571else if ( IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) ) 602if ( SafeNativeMethods.IsWindow( _hwnd ) ) 616if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 632return IsBitSet(GetWindowExStyle(), SafeNativeMethods.WS_EX_TOPMOST); 652if ( IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_MDICHILD) ) 657NativeMethods.HWND hwndParent = SafeNativeMethods.GetAncestor(NativeMethods.HWND.Cast(_hwnd), SafeNativeMethods.GA_PARENT); 674int dx = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CXHSCROLL); 675int dy = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CYHSCROLL); 733if ( IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) ) 793if ( !SafeNativeMethods.IsWindow( _hwnd ) ) 805int x = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CXMAXTRACK); 806int y = SafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CYMAXTRACK); 855if (!SafeNativeMethods.IsWindow(_hwnd)) 873if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 879if (IsBitSet(style, SafeNativeMethods.WS_SYSMENU)) 889if (IsBitSet(style, SafeNativeMethods.WS_MAXIMIZE)) 897if ( IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) && !IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_MDICHILD) ) 902return IsBitSet(style, SafeNativeMethods.WS_BORDER) && IsBitSet(style, SafeNativeMethods.WS_DLGFRAME); 918if (IsBitSet(style, SafeNativeMethods.WS_DISABLED)) 924if (IsBitSet(style, SafeNativeMethods.WS_SYSMENU)) 934if ( IsBitSet(style, SafeNativeMethods.WS_MAXIMIZE) || IsBitSet(style, SafeNativeMethods.WS_MINIMIZE) ) 939return IsBitSet(style, SafeNativeMethods.WS_THICKFRAME); 948if (!SafeNativeMethods.IsWindow(_hwnd)) 973NativeMethods.HWND desktop = SafeNativeMethods.GetDesktopWindow(); 1043if (IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_APPWINDOW)) 1055bool hasTitleBar = IsBitSet( style, SafeNativeMethods.WS_BORDER ) && IsBitSet( style, SafeNativeMethods.WS_DLGFRAME ); 1061if (IsBitSet( extendedStyle, SafeNativeMethods.WS_EX_TOOLWINDOW ) && !hasTitleBar ) 1064if (IsBitSet(style, SafeNativeMethods.WS_POPUP) && !hasTitleBar) 1068if (!IsTopLevelWindow(hwnd) && !IsBitSet( extendedStyle, SafeNativeMethods.WS_EX_MDICHILD ) ) 1090if ( IsBitSet(style, SafeNativeMethods.WS_THICKFRAME) ) 1094if ( IsBitSet(style, SafeNativeMethods.WS_BORDER) && IsBitSet(style, SafeNativeMethods.WS_DLGFRAME) ) 1146private const int ScanPrev = SafeNativeMethods.GW_HWNDPREV; 1147private const int ScanNext = SafeNativeMethods.GW_HWNDNEXT; 1191NativeMethods.HWND desktop = SafeNativeMethods.GetDesktopWindow(); 1192NativeMethods.HWND scan = Misc.GetWindow(desktop, SafeNativeMethods.GW_CHILD); 1196scan = Misc.GetWindow(scan, SafeNativeMethods.GW_HWNDLAST); 1215NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT); 1218if (parent == SafeNativeMethods.GetDesktopWindow()) 1250hwnd = Misc.GetWindow(hwndOwner, SafeNativeMethods.GW_CHILD); 1292NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(_hwnd, SafeNativeMethods.GA_PARENT); 1317hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD); 1339NativeMethods.HWND hwnd = Misc.GetWindow(_hwnd, SafeNativeMethods.GW_CHILD); 1342hwnd = Misc.GetWindow(hwnd, SafeNativeMethods.GW_HWNDLAST); 1420for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD); 1422hChild = Misc.GetWindow(hChild, SafeNativeMethods.GW_HWNDNEXT)) 1455if( ! SafeNativeMethods.IsWindowEnabled( hwnd ) ) 1458hwnd = SafeNativeMethods.GetAncestor( hwnd, SafeNativeMethods.GA_PARENT ); 1468if(!SafeNativeMethods.IsWindowVisible(hwnd)) 1500if (SafeNativeMethods.DwmGetWindowAttribute(hwnd, SafeNativeMethods.DWMWA_CLOAKED, ref dwCloaked, sizeof(int)) == 0) 1513return SafeNativeMethods.GetAncestor( hwnd, SafeNativeMethods.GA_PARENT ) == SafeNativeMethods.GetDesktopWindow(); 1518NativeMethods.HWND hwndOwner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER); 1581int thread = SafeNativeMethods.GetWindowThreadProcessId(_hwnd, out process); 1587SafeNativeMethods.EnumThreadWndProc enumWindows = new SafeNativeMethods.EnumThreadWndProc(EnumWindows); 1592bool noModalWindow = SafeNativeMethods.EnumThreadWindows(thread, enumWindows, _hwnd); 1602if ( IsBitSet(extendedStyle, SafeNativeMethods.WS_EX_DLGMODALFRAME) ) 1604NativeMethods.HWND owner = Misc.GetWindow(hwnd, SafeNativeMethods.GW_OWNER); 1640SafeNativeMethods.GUITHREADINFO gui = new SafeNativeMethods.GUITHREADINFO(); 1646return (SafeNativeMethods.GUI_INMENUMODE == (gui.dwFlags & SafeNativeMethods.GUI_INMENUMODE)); 1740for (NativeMethods.HWND hChild = Misc.GetWindow(hwnd, SafeNativeMethods.GW_CHILD); 1742hChild = Misc.GetWindow(hChild, SafeNativeMethods.GW_HWNDNEXT)) 1761NativeMethods.HWND hwndTopLevel = SafeNativeMethods.GetAncestor(hChild, SafeNativeMethods.GA_ROOT); 1765SafeNativeMethods.PhysicalToLogicalPoint(hwndTopLevel, ref pt); 1785if ((style & SafeNativeMethods.WS_CHILD) != 0 1786&& (style & SafeNativeMethods.WS_DISABLED) != 0) 1810if( ( exStyle & SafeNativeMethods.WS_EX_LAYERED ) != 0 1811&& ( exStyle & SafeNativeMethods.WS_EX_TRANSPARENT ) != 0 ) 1818if (SafeNativeMethods.GetWindowRgn(hChild.h, hrgn) == SafeNativeMethods.COMPLEXREGION) 1821if (!SafeNativeMethods.PtInRegion(hrgn, (int)xLogical - rc.left, (int)yLogical - rc.top)) 1911hwnd = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT); 1973int style = Misc.GetWindowLong(hwnd, SafeNativeMethods.GWL_STYLE); 1984int exstyle = Misc.GetWindowLong(hwnd, SafeNativeMethods.GWL_EXSTYLE); 2002if (IsBitSet(exStyle, SafeNativeMethods.WS_EX_MDICHILD)) 2004NativeMethods.HWND parent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT); 2103SafeNativeMethods.GUITHREADINFO gti = new SafeNativeMethods.GUITHREADINFO(); 2119SafeNativeMethods.GUITHREADINFO gti = new SafeNativeMethods.GUITHREADINFO(); 2122if ((gti.dwFlags & SafeNativeMethods.GUI_INMENUMODE) != 0 2123|| (gti.dwFlags & SafeNativeMethods.GUI_SYSTEMMENUMODE) != 0 2124|| (gti.dwFlags & SafeNativeMethods.GUI_POPUPMENUMODE) != 0)
MS\Internal\Automation\MenuTracker.cs (2)
71if( !SafeNativeMethods.IsWindow( nativeHwnd ) ) 75if( !SafeNativeMethods.IsWindowVisible( nativeHwnd ) )
MS\Internal\Automation\Misc.cs (7)
308IntPtr result = SafeNativeMethods.CreateRectRgn(left, top, right, bottom); 347bool result = SafeNativeMethods.GetClientRect(hwnd, out rc); 358internal static bool GetGUIThreadInfo(int idThread, ref SafeNativeMethods.GUITHREADINFO guiThreadInfo) 362bool result = SafeNativeMethods.GetGUIThreadInfo(0, ref guiThreadInfo); 395int result = SafeNativeMethods.GetModuleFileNameEx(hProcess, hModule, buffer, length); 477bool result = SafeNativeMethods.GetWindowRect(hwnd, out rc); 490short result = SafeNativeMethods.GlobalAddAtom(lpString);
MS\Internal\Automation\ProxyManager.cs (5)
240int result = SafeNativeMethods.GetClassName(hwnd, str, NativeMethods.MAX_PATH); 254int result = SafeNativeMethods.RealGetWindowClass(hwnd, str, NativeMethods.MAX_PATH); 296NativeMethods.HWND hwndParent = SafeNativeMethods.GetAncestor(hwnd, SafeNativeMethods.GA_PARENT); 314int instance = Misc.GetWindowLong(hwnd, SafeNativeMethods.GWL_HINSTANCE);
MS\Internal\Automation\SafeProcessHandle.cs (1)
42if (SafeNativeMethods.GetWindowThreadProcessId(hwnd, out processId) == 0)
MS\Internal\Automation\WindowHideOrCloseTracker.cs (1)
72if (eventId == NativeMethods.EVENT_OBJECT_HIDE && !SafeNativeMethods.IsWindow( nativeHwnd ))
MS\Internal\Automation\WindowInteractionStateTracker.cs (1)
88if (!SafeNativeMethods.IsWindow(nativeHwnd))
MS\Internal\Automation\WindowShowOrOpenTracker.cs (2)
73if (! SafeNativeMethods.IsWindow( nativeHwnd )) 78if (! SafeNativeMethods.IsWindowVisible( nativeHwnd ))
MS\Internal\Automation\WindowVisualStateTracker.cs (1)
85if (!SafeNativeMethods.IsWindow(nativeHwnd))