MS\Internal\AutomationProxies\Accessible.cs (9)
179hr = UnsafeNativeMethods.ObjectFromLresult(lResult, ref UnsafeNativeMethods.IID_IAccessible, wParam, ref acc);
218hr = UnsafeNativeMethods.AccessibleObjectFromWindow(hwnd, idObject, ref UnsafeNativeMethods.IID_IUnknown, ref obj);
863int result = UnsafeNativeMethods.WindowFromAccessibleObject(_acc, ref _hwnd);
899int hr = UnsafeNativeMethods.AccessibleObjectFromWindow(hwnd, idObject, ref UnsafeNativeMethods.IID_IUnknown, ref obj);
940if (UnsafeNativeMethods.AccessibleChildren(accessibleObject, 0, childCount, aChildren, out childrenReturned) == NativeMethods.E_INVALIDARG)
1177hr = UnsafeNativeMethods.AccessibleChildren(parent, 0, count, children, out actualCount);
MS\Internal\AutomationProxies\Misc.cs (93)
123bool result = UnsafeNativeMethods.CloseHandle(processHandle);
162return UnsafeNativeMethods.DispatchMessage(ref msg);
168bool result = UnsafeNativeMethods.EnumChildWindows(hwnd, lpEnumFunc, lParam);
196int result = UnsafeNativeMethods.GetClassName(hwnd, sb, NativeMethods.MAX_PATH);
260bool result = UnsafeNativeMethods.GetClientRect(hwnd, ref rc);
277bool result = UnsafeNativeMethods.GetComboBoxInfo(hwnd, ref cbi);
291bool result = (System.Environment.OSVersion.Version.Major >= 6) ? UnsafeNativeMethods.GetPhysicalCursorPos(ref pt)
292: UnsafeNativeMethods.GetCursorPos(ref pt);
306IntPtr hdc = UnsafeNativeMethods.GetDC(hwnd);
347UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO info = new UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO();
352UnsafeNativeMethods.EnumThreadWndProc enumToolTipWindows = new UnsafeNativeMethods.EnumThreadWndProc(EnumToolTipWindows);
354UnsafeNativeMethods.EnumThreadWindows(threadId, enumToolTipWindows, ref info);
375if (!UnsafeNativeMethods.IsWindow(hwnd))
382if (hwndParent == IntPtr.Zero || hwndParent == UnsafeNativeMethods.GetDesktopWindow())
413int style = UnsafeNativeMethods.GetWindowLong(peer, NativeMethods.GWL_STYLE, out error);
443int count = UnsafeNativeMethods.GetMenuItemCount(hmenu);
456bool result = UnsafeNativeMethods.GetMenuItemInfo(hmenu, item, byPosition, ref menuItemInfo);
469bool result = UnsafeNativeMethods.GetMenuItemRect(hwnd, hmenu, item, out rc);
482int result = UnsafeNativeMethods.GetMessage(ref msg, hwnd, msgFilterMin, msgFilterMax);
496int result = UnsafeNativeMethods.GetObjectW(hObject, size, ref lf);
522bool result = UnsafeNativeMethods.GetScrollBarInfo(hwnd, fnBar, ref sbi);
535bool result = UnsafeNativeMethods.GetScrollInfo(hwnd, fnBar, ref si);
584memAddr = VirtualAlloc(IntPtr.Zero, new UIntPtr(cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE);
587VirtualAlloc(new IntPtr((byte *)memAddr.ToPointer() + cbSize - pageSize), new UIntPtr(pageSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_NOACCESS);
613VirtualFree(memAddr, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE);
635int exstyle = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_EXSTYLE, out lastWin32Error);
649int id = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_ID, out lastWin32Error);
665int result = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_HWNDPARENT, out lastWin32Error);
677bool result = UnsafeNativeMethods.GetWindowRect(hwnd, ref rc);
691int style = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_STYLE, out lastWin32Error);
706uint threadId = UnsafeNativeMethods.GetWindowThreadProcessId(hwnd, out processId);
718short atom = UnsafeNativeMethods.GlobalAddAtom(atomName);
886bool result = UnsafeNativeMethods.IsWow64Process(hProcess, out Wow64Process);
961bool mouseSwapped = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SWAPBUTTON) != 0;
991terminationEvent = UnsafeNativeMethods.MsgWaitForMultipleObjects(0, null, waitAll, milliseconds, wakeMask);
1001terminationEvent = UnsafeNativeMethods.MsgWaitForMultipleObjects(1, handles, waitAll, milliseconds, wakeMask);
1021IntPtr processHandle = UnsafeNativeMethods.OpenProcess(flags, inherit, processId);
1032processHandle = UnsafeNativeMethods.GetProcessHandleFromHwnd(hwnd);
1053bool result = UnsafeNativeMethods.PostMessage(hwnd, msg, wParam, lParam);
1088bool result = UnsafeNativeMethods.GetGUIThreadInfo(idThread, ref gui);
1183internal static bool ProxyGetTitleBarInfo(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFO ti)
1185ti = new UnsafeNativeMethods.TITLEBARINFO();
1188bool result = UnsafeNativeMethods.GetTitleBarInfo(hwnd, ref ti);
1199internal static bool ProxyGetTitleBarInfoEx(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFOEX ti)
1201ti = new UnsafeNativeMethods.TITLEBARINFOEX();
1204IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1229UnsafeNativeMethods.TITLEBARINFO ti;
1259IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1287IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1313IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, sb, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1339IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, ref lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1354IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, out wParam, out lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1390bool result = UnsafeNativeMethods.ReadProcessMemory(hProcess, source, dest, size, out bytesRead);
1403bool result = UnsafeNativeMethods.ReadProcessMemory(hProcess, source, destAddress, size, out bytesRead);
1419uint result = UnsafeNativeMethods.RealGetWindowClass(hwnd, className, NativeMethods.MAX_PATH);
1433bool result = UnsafeNativeMethods.RegisterHotKey(hwnd, atom, modifiers, vk);
1449return UnsafeNativeMethods.ReleaseDC(hwnd, hdc);
1472return UnsafeNativeMethods.SelectObject(hdc, hObject);
1477int eventCount = UnsafeNativeMethods.SendInput(inputs, ref ki, size);
1519if (UnsafeNativeMethods.SetForegroundWindow(hwnd))
1549bool fShiftDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_SHIFT) & unchecked((int)0x80000000)) != 0;
1550bool fAltDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_MENU) & unchecked((int)0x80000000)) != 0;
1551bool fCtrlDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_CONTROL) & unchecked((int)0x80000000)) != 0;
1554Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_SHIFT, false);
1557Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_MENU, false);
1560Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_CONTROL, false);
1567Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_SHIFT, true);
1570Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_MENU, true);
1573Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_CONTROL, true);
1592UnsafeNativeMethods.TranslateMessage(ref msg);
1599UnsafeNativeMethods.DispatchMessage(ref msg);
1612return UnsafeNativeMethods.SetForegroundWindow(hwnd);
1639return UnsafeNativeMethods.SetWinEventHook(eventMin, eventMax, hmodWinEventProc, WinEventReentrancyFilter, idProcess, idThread, dwFlags);
1734return UnsafeNativeMethods.UnhookWinEvent(winEventHook);
1752bool result = UnsafeNativeMethods.UnregisterHotKey(hwnd, atom);
1765IntPtr result = UnsafeNativeMethods.VirtualAlloc(address, size, allocationType, protect);
1778IntPtr result = UnsafeNativeMethods.VirtualAllocEx(hProcess, address, size, allocationType, protect);
1791bool result = UnsafeNativeMethods.VirtualFree(address, size, freeType);
1804bool result = UnsafeNativeMethods.VirtualFreeEx(hProcess, address, size, freeType);
1817bool result = UnsafeNativeMethods.WriteProcessMemory(hProcess, dest, sourceAddress, size, out bytesWritten);
1911private static bool EnumToolTipWindows(IntPtr hwnd, ref UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO lParam)
1957UnsafeNativeMethods.GetSystemInfo(out sysInfo);
1993UnsafeNativeMethods.TITLEBARINFO tiDL;
2010int buttonWidth = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSIZE) - 1;
2011int buttonHeight = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSIZE) - 1;
2064UnsafeNativeMethods.TITLEBARINFOEX ti;
MS\Internal\AutomationProxies\WindowsMenu.cs (28)
165hmenu = UnsafeNativeMethods.GetMenu(hwnd);
267IntPtr hSubMenu = UnsafeNativeMethods.GetSubMenu(hmenu, i);
312IntPtr hmenu = UnsafeNativeMethods.GetMenu(gui.hwndActive);
599IntPtr hMenuPossibleParent = UnsafeNativeMethods.GetMenu (gui.hwndActive);
690if (UnsafeNativeMethods.GetSubMenu (hmenuPossibleParent, i) == hmenuChild)
820UnsafeNativeMethods.TITLEBARINFO ti;
885return UnsafeNativeMethods.GetSubMenu(mbi.hMenu, 0);
923int state = UnsafeNativeMethods.GetMenuState(hmenu, i, NativeMethods.MF_BYPOSITION);
1264UnsafeNativeMethods.TITLEBARINFO ti;
1421return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero;
1513while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
1603IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item);
1622IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item);
1871return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE);
1886return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED);
1988IntPtr submenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item);
2041short convert = UnsafeNativeMethods.VkKeyScan (hotKey);
2140IntPtr hSubmenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item);
2202for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++)
2337while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
2368if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE))
2402(IntPtr.Zero != UnsafeNativeMethods.GetSubMenu (_hmenu, 0)) &&
2403Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP))
2508int result = UnsafeNativeMethods.GetMenuItemID(_hmenu, _item);
2540int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION);
2549if (UnsafeNativeMethods.GetMenuString(_hmenu, _item, strbldr, length + 1, NativeMethods.MF_BYPOSITION) == length)
2653int state = UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION);