MS\Internal\AutomationProxies\Accessible.cs (10)
174wParam = new IntPtr(UnsafeNativeMethods.GetCurrentProcessId());
189hr = UnsafeNativeMethods.ObjectFromLresult(lResult, ref UnsafeNativeMethods.IID_IAccessible, wParam, ref acc);
228hr = UnsafeNativeMethods.AccessibleObjectFromWindow(hwnd, idObject, ref UnsafeNativeMethods.IID_IUnknown, ref obj);
889int result = UnsafeNativeMethods.WindowFromAccessibleObject(_acc, ref _hwnd);
925int hr = UnsafeNativeMethods.AccessibleObjectFromWindow(hwnd, idObject, ref UnsafeNativeMethods.IID_IUnknown, ref obj);
966if (UnsafeNativeMethods.AccessibleChildren(accessibleObject, 0, childCount, aChildren, out childrenReturned) == NativeMethods.E_INVALIDARG)
1216hr = UnsafeNativeMethods.AccessibleChildren(parent, 0, count, children, out actualCount);
MS\Internal\AutomationProxies\Misc.cs (93)
134bool result = UnsafeNativeMethods.CloseHandle(processHandle);
173return UnsafeNativeMethods.DispatchMessage(ref msg);
179bool result = UnsafeNativeMethods.EnumChildWindows(hwnd, lpEnumFunc, lParam);
207int result = UnsafeNativeMethods.GetClassName(hwnd, sb, NativeMethods.MAX_PATH);
271bool result = UnsafeNativeMethods.GetClientRect(hwnd, ref rc);
288bool result = UnsafeNativeMethods.GetComboBoxInfo(hwnd, ref cbi);
302bool result = (System.Environment.OSVersion.Version.Major >= 6) ? UnsafeNativeMethods.GetPhysicalCursorPos(ref pt)
303: UnsafeNativeMethods.GetCursorPos(ref pt);
317IntPtr hdc = UnsafeNativeMethods.GetDC(hwnd);
358UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO info = new UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO();
363UnsafeNativeMethods.EnumThreadWndProc enumToolTipWindows = new UnsafeNativeMethods.EnumThreadWndProc(EnumToolTipWindows);
365UnsafeNativeMethods.EnumThreadWindows(threadId, enumToolTipWindows, ref info);
386if (!UnsafeNativeMethods.IsWindow(hwnd))
393if (hwndParent == IntPtr.Zero || hwndParent == UnsafeNativeMethods.GetDesktopWindow())
424int style = UnsafeNativeMethods.GetWindowLong(peer, NativeMethods.GWL_STYLE, out error);
454int count = UnsafeNativeMethods.GetMenuItemCount(hmenu);
467bool result = UnsafeNativeMethods.GetMenuItemInfo(hmenu, item, byPosition, ref menuItemInfo);
480bool result = UnsafeNativeMethods.GetMenuItemRect(hwnd, hmenu, item, out rc);
493int result = UnsafeNativeMethods.GetMessage(ref msg, hwnd, msgFilterMin, msgFilterMax);
507int result = UnsafeNativeMethods.GetObjectW(hObject, size, ref lf);
533bool result = UnsafeNativeMethods.GetScrollBarInfo(hwnd, fnBar, ref sbi);
546bool result = UnsafeNativeMethods.GetScrollInfo(hwnd, fnBar, ref si);
595memAddr = VirtualAlloc(IntPtr.Zero, new UIntPtr(cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE);
598VirtualAlloc(new IntPtr((byte *)memAddr.ToPointer() + cbSize - pageSize), new UIntPtr(pageSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_NOACCESS);
624VirtualFree(memAddr, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE);
646int exstyle = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_EXSTYLE, out lastWin32Error);
660int id = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_ID, out lastWin32Error);
676int result = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_HWNDPARENT, out lastWin32Error);
688bool result = UnsafeNativeMethods.GetWindowRect(hwnd, ref rc);
702int style = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_STYLE, out lastWin32Error);
717uint threadId = UnsafeNativeMethods.GetWindowThreadProcessId(hwnd, out processId);
729short atom = UnsafeNativeMethods.GlobalAddAtom(atomName);
898bool result = UnsafeNativeMethods.IsWow64Process(hProcess, out Wow64Process);
973bool mouseSwapped = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SWAPBUTTON) != 0;
1004terminationEvent = UnsafeNativeMethods.MsgWaitForMultipleObjects(0, null, waitAll, milliseconds, wakeMask);
1015terminationEvent = UnsafeNativeMethods.MsgWaitForMultipleObjects(1, handles, waitAll, milliseconds, wakeMask);
1035IntPtr processHandle = UnsafeNativeMethods.OpenProcess(flags, inherit, processId);
1046processHandle = UnsafeNativeMethods.GetProcessHandleFromHwnd(hwnd);
1067bool result = UnsafeNativeMethods.PostMessage(hwnd, msg, wParam, lParam);
1101bool result = UnsafeNativeMethods.GetGUIThreadInfo(idThread, ref gui);
1196internal static bool ProxyGetTitleBarInfo(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFO ti)
1198ti = new UnsafeNativeMethods.TITLEBARINFO();
1201bool result = UnsafeNativeMethods.GetTitleBarInfo(hwnd, ref ti);
1212internal static bool ProxyGetTitleBarInfoEx(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFOEX ti)
1214ti = new UnsafeNativeMethods.TITLEBARINFOEX();
1217IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1242UnsafeNativeMethods.TITLEBARINFO ti;
1272IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1300IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1326IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, sb, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1352IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, ref lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1367IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, out wParam, out lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1403bool result = UnsafeNativeMethods.ReadProcessMemory(hProcess, source, dest, size, out bytesRead);
1416bool result = UnsafeNativeMethods.ReadProcessMemory(hProcess, source, destAddress, size, out bytesRead);
1432uint result = UnsafeNativeMethods.RealGetWindowClass(hwnd, className, NativeMethods.MAX_PATH);
1446bool result = UnsafeNativeMethods.RegisterHotKey(hwnd, atom, modifiers, vk);
1462return UnsafeNativeMethods.ReleaseDC(hwnd, hdc);
1485return UnsafeNativeMethods.SelectObject(hdc, hObject);
1490int eventCount = UnsafeNativeMethods.SendInput(inputs, ref ki, size);
1532if (UnsafeNativeMethods.SetForegroundWindow(hwnd))
1562bool fShiftDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_SHIFT) & unchecked((int)0x80000000)) != 0;
1563bool fAltDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_MENU) & unchecked((int)0x80000000)) != 0;
1564bool fCtrlDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_CONTROL) & unchecked((int)0x80000000)) != 0;
1567Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_SHIFT, false);
1570Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_MENU, false);
1573Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_CONTROL, false);
1580Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_SHIFT, true);
1583Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_MENU, true);
1586Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_CONTROL, true);
1605UnsafeNativeMethods.TranslateMessage(ref msg);
1612UnsafeNativeMethods.DispatchMessage(ref msg);
1625return UnsafeNativeMethods.SetForegroundWindow(hwnd);
1652return UnsafeNativeMethods.SetWinEventHook(eventMin, eventMax, hmodWinEventProc, WinEventReentrancyFilter, idProcess, idThread, dwFlags);
1747return UnsafeNativeMethods.UnhookWinEvent(winEventHook);
1765bool result = UnsafeNativeMethods.UnregisterHotKey(hwnd, atom);
1778IntPtr result = UnsafeNativeMethods.VirtualAlloc(address, size, allocationType, protect);
1791IntPtr result = UnsafeNativeMethods.VirtualAllocEx(hProcess, address, size, allocationType, protect);
1804bool result = UnsafeNativeMethods.VirtualFree(address, size, freeType);
1817bool result = UnsafeNativeMethods.VirtualFreeEx(hProcess, address, size, freeType);
1830bool result = UnsafeNativeMethods.WriteProcessMemory(hProcess, dest, sourceAddress, size, out bytesWritten);
1924private static bool EnumToolTipWindows(IntPtr hwnd, ref UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO lParam)
1970UnsafeNativeMethods.GetSystemInfo(out sysInfo);
2006UnsafeNativeMethods.TITLEBARINFO tiDL;
2023int buttonWidth = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSIZE) - 1;
2024int buttonHeight = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSIZE) - 1;
2077UnsafeNativeMethods.TITLEBARINFOEX ti;
MS\Internal\AutomationProxies\WindowsMenu.cs (28)
178hmenu = UnsafeNativeMethods.GetMenu(hwnd);
280IntPtr hSubMenu = UnsafeNativeMethods.GetSubMenu(hmenu, i);
325IntPtr hmenu = UnsafeNativeMethods.GetMenu(gui.hwndActive);
612IntPtr hMenuPossibleParent = UnsafeNativeMethods.GetMenu (gui.hwndActive);
703if (UnsafeNativeMethods.GetSubMenu (hmenuPossibleParent, i) == hmenuChild)
833UnsafeNativeMethods.TITLEBARINFO ti;
898return UnsafeNativeMethods.GetSubMenu(mbi.hMenu, 0);
937int state = UnsafeNativeMethods.GetMenuState(hmenu, i, NativeMethods.MF_BYPOSITION);
1279UnsafeNativeMethods.TITLEBARINFO ti;
1436return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero;
1528while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
1618IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item);
1637IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item);
1886return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE);
1901return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED);
2003IntPtr submenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item);
2056short convert = UnsafeNativeMethods.VkKeyScan (hotKey);
2155IntPtr hSubmenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item);
2217for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++)
2352while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
2383if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE))
2417(IntPtr.Zero != UnsafeNativeMethods.GetSubMenu (_hmenu, 0)) &&
2418Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP))
2523int result = UnsafeNativeMethods.GetMenuItemID(_hmenu, _item);
2555int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION);
2564if (UnsafeNativeMethods.GetMenuString(_hmenu, _item, strbldr, length + 1, NativeMethods.MF_BYPOSITION) == length)
2668int state = UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION);