MS\Internal\AutomationProxies\Accessible.cs (9)
174hr = UnsafeNativeMethods.ObjectFromLresult(lResult, ref UnsafeNativeMethods.IID_IAccessible, wParam, ref acc);
213hr = UnsafeNativeMethods.AccessibleObjectFromWindow(hwnd, idObject, ref UnsafeNativeMethods.IID_IUnknown, ref obj);
840int result = UnsafeNativeMethods.WindowFromAccessibleObject(_acc, ref _hwnd);
873int hr = UnsafeNativeMethods.AccessibleObjectFromWindow(hwnd, idObject, ref UnsafeNativeMethods.IID_IUnknown, ref obj);
914if (UnsafeNativeMethods.AccessibleChildren(accessibleObject, 0, childCount, aChildren, out childrenReturned) == NativeMethods.E_INVALIDARG)
1151hr = UnsafeNativeMethods.AccessibleChildren(parent, 0, count, children, out actualCount);
MS\Internal\AutomationProxies\Misc.cs (93)
118bool result = UnsafeNativeMethods.CloseHandle(processHandle);
156return UnsafeNativeMethods.DispatchMessage(ref msg);
162bool result = UnsafeNativeMethods.EnumChildWindows(hwnd, lpEnumFunc, lParam);
190int result = UnsafeNativeMethods.GetClassName(hwnd, sb, NativeMethods.MAX_PATH);
254bool result = UnsafeNativeMethods.GetClientRect(hwnd, ref rc);
271bool result = UnsafeNativeMethods.GetComboBoxInfo(hwnd, ref cbi);
285bool result = (System.Environment.OSVersion.Version.Major >= 6) ? UnsafeNativeMethods.GetPhysicalCursorPos(ref pt)
286: UnsafeNativeMethods.GetCursorPos(ref pt);
300IntPtr hdc = UnsafeNativeMethods.GetDC(hwnd);
341UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO info = new UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO
348UnsafeNativeMethods.EnumThreadWndProc enumToolTipWindows = new UnsafeNativeMethods.EnumThreadWndProc(EnumToolTipWindows);
350UnsafeNativeMethods.EnumThreadWindows(threadId, enumToolTipWindows, ref info);
371if (!UnsafeNativeMethods.IsWindow(hwnd))
378if (hwndParent == IntPtr.Zero || hwndParent == UnsafeNativeMethods.GetDesktopWindow())
407int style = UnsafeNativeMethods.GetWindowLong(peer, NativeMethods.GWL_STYLE, out error);
437int count = UnsafeNativeMethods.GetMenuItemCount(hmenu);
450bool result = UnsafeNativeMethods.GetMenuItemInfo(hmenu, item, byPosition, ref menuItemInfo);
463bool result = UnsafeNativeMethods.GetMenuItemRect(hwnd, hmenu, item, out rc);
476int result = UnsafeNativeMethods.GetMessage(ref msg, hwnd, msgFilterMin, msgFilterMax);
490int result = UnsafeNativeMethods.GetObjectW(hObject, size, ref lf);
516bool result = UnsafeNativeMethods.GetScrollBarInfo(hwnd, fnBar, ref sbi);
529bool result = UnsafeNativeMethods.GetScrollInfo(hwnd, fnBar, ref si);
578memAddr = VirtualAlloc(IntPtr.Zero, new UIntPtr(cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE);
581VirtualAlloc(new IntPtr((byte *)memAddr.ToPointer() + cbSize - pageSize), new UIntPtr(pageSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_NOACCESS);
607VirtualFree(memAddr, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE);
629int exstyle = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_EXSTYLE, out lastWin32Error);
643int id = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_ID, out lastWin32Error);
659int result = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_HWNDPARENT, out lastWin32Error);
671bool result = UnsafeNativeMethods.GetWindowRect(hwnd, ref rc);
685int style = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_STYLE, out lastWin32Error);
698uint threadId = UnsafeNativeMethods.GetWindowThreadProcessId(hwnd, out processId);
710short atom = UnsafeNativeMethods.GlobalAddAtom(atomName);
878bool result = UnsafeNativeMethods.IsWow64Process(hProcess, out Wow64Process);
953bool mouseSwapped = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SWAPBUTTON) != 0;
983terminationEvent = UnsafeNativeMethods.MsgWaitForMultipleObjects(0, null, waitAll, milliseconds, wakeMask);
993terminationEvent = UnsafeNativeMethods.MsgWaitForMultipleObjects(1, handles, waitAll, milliseconds, wakeMask);
1013IntPtr processHandle = UnsafeNativeMethods.OpenProcess(flags, inherit, processId);
1024processHandle = UnsafeNativeMethods.GetProcessHandleFromHwnd(hwnd);
1045bool result = UnsafeNativeMethods.PostMessage(hwnd, msg, wParam, lParam);
1080bool result = UnsafeNativeMethods.GetGUIThreadInfo(idThread, ref gui);
1175internal static bool ProxyGetTitleBarInfo(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFO ti)
1177ti = new UnsafeNativeMethods.TITLEBARINFO();
1180bool result = UnsafeNativeMethods.GetTitleBarInfo(hwnd, ref ti);
1191internal static bool ProxyGetTitleBarInfoEx(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFOEX ti)
1193ti = new UnsafeNativeMethods.TITLEBARINFOEX();
1196IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1221UnsafeNativeMethods.TITLEBARINFO ti;
1251IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1279IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1305IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, sb, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1331IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, ref lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1346IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, out wParam, out lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1382bool result = UnsafeNativeMethods.ReadProcessMemory(hProcess, source, dest, size, out bytesRead);
1395bool result = UnsafeNativeMethods.ReadProcessMemory(hProcess, source, destAddress, size, out bytesRead);
1411uint result = UnsafeNativeMethods.RealGetWindowClass(hwnd, className, NativeMethods.MAX_PATH);
1425bool result = UnsafeNativeMethods.RegisterHotKey(hwnd, atom, modifiers, vk);
1439return UnsafeNativeMethods.ReleaseDC(hwnd, hdc);
1459return UnsafeNativeMethods.SelectObject(hdc, hObject);
1464int eventCount = UnsafeNativeMethods.SendInput(inputs, ref ki, size);
1506if (UnsafeNativeMethods.SetForegroundWindow(hwnd))
1536bool fShiftDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_SHIFT) & unchecked((int)0x80000000)) != 0;
1537bool fAltDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_MENU) & unchecked((int)0x80000000)) != 0;
1538bool fCtrlDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_CONTROL) & unchecked((int)0x80000000)) != 0;
1541Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_SHIFT, false);
1544Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_MENU, false);
1547Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_CONTROL, false);
1554Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_SHIFT, true);
1557Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_MENU, true);
1560Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_CONTROL, true);
1576UnsafeNativeMethods.TranslateMessage(ref msg);
1582UnsafeNativeMethods.DispatchMessage(ref msg);
1595return UnsafeNativeMethods.SetForegroundWindow(hwnd);
1620return UnsafeNativeMethods.SetWinEventHook(eventMin, eventMax, hmodWinEventProc, WinEventReentrancyFilter, idProcess, idThread, dwFlags);
1713return UnsafeNativeMethods.UnhookWinEvent(winEventHook);
1731bool result = UnsafeNativeMethods.UnregisterHotKey(hwnd, atom);
1744IntPtr result = UnsafeNativeMethods.VirtualAlloc(address, size, allocationType, protect);
1757IntPtr result = UnsafeNativeMethods.VirtualAllocEx(hProcess, address, size, allocationType, protect);
1770bool result = UnsafeNativeMethods.VirtualFree(address, size, freeType);
1783bool result = UnsafeNativeMethods.VirtualFreeEx(hProcess, address, size, freeType);
1796bool result = UnsafeNativeMethods.WriteProcessMemory(hProcess, dest, sourceAddress, size, out bytesWritten);
1890private static bool EnumToolTipWindows(IntPtr hwnd, ref UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO lParam)
1936UnsafeNativeMethods.GetSystemInfo(out sysInfo);
1972UnsafeNativeMethods.TITLEBARINFO tiDL;
1989int buttonWidth = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSIZE) - 1;
1990int buttonHeight = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSIZE) - 1;
2043UnsafeNativeMethods.TITLEBARINFOEX ti;
MS\Internal\AutomationProxies\WindowsMenu.cs (28)
161hmenu = UnsafeNativeMethods.GetMenu(hwnd);
263IntPtr hSubMenu = UnsafeNativeMethods.GetSubMenu(hmenu, i);
308IntPtr hmenu = UnsafeNativeMethods.GetMenu(gui.hwndActive);
595IntPtr hMenuPossibleParent = UnsafeNativeMethods.GetMenu (gui.hwndActive);
686if (UnsafeNativeMethods.GetSubMenu (hmenuPossibleParent, i) == hmenuChild)
816UnsafeNativeMethods.TITLEBARINFO ti;
881return UnsafeNativeMethods.GetSubMenu(mbi.hMenu, 0);
919int state = UnsafeNativeMethods.GetMenuState(hmenu, i, NativeMethods.MF_BYPOSITION);
1260UnsafeNativeMethods.TITLEBARINFO ti;
1415return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero;
1507while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
1597IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item);
1616IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item);
1865return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE);
1880return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED);
1982IntPtr submenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item);
2035short convert = UnsafeNativeMethods.VkKeyScan (hotKey);
2134IntPtr hSubmenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item);
2196for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++)
2331while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
2362if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE))
2396(IntPtr.Zero != UnsafeNativeMethods.GetSubMenu (_hmenu, 0)) &&
2397Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP))
2502int result = UnsafeNativeMethods.GetMenuItemID(_hmenu, _item);
2534int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION);
2543if (UnsafeNativeMethods.GetMenuString(_hmenu, _item, strbldr, length + 1, NativeMethods.MF_BYPOSITION) == length)
2647int state = UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION);