MS\Internal\AutomationProxies\Accessible.cs (9)
175hr = UnsafeNativeMethods.ObjectFromLresult(lResult, ref UnsafeNativeMethods.IID_IAccessible, wParam, ref acc);
214hr = UnsafeNativeMethods.AccessibleObjectFromWindow(hwnd, idObject, ref UnsafeNativeMethods.IID_IUnknown, ref obj);
841int result = UnsafeNativeMethods.WindowFromAccessibleObject(_acc, ref _hwnd);
874int hr = UnsafeNativeMethods.AccessibleObjectFromWindow(hwnd, idObject, ref UnsafeNativeMethods.IID_IUnknown, ref obj);
915if (UnsafeNativeMethods.AccessibleChildren(accessibleObject, 0, childCount, aChildren, out childrenReturned) == NativeMethods.E_INVALIDARG)
1152hr = UnsafeNativeMethods.AccessibleChildren(parent, 0, count, children, out actualCount);
MS\Internal\AutomationProxies\Misc.cs (93)
119bool result = UnsafeNativeMethods.CloseHandle(processHandle);
157return UnsafeNativeMethods.DispatchMessage(ref msg);
163bool result = UnsafeNativeMethods.EnumChildWindows(hwnd, lpEnumFunc, lParam);
191int result = UnsafeNativeMethods.GetClassName(hwnd, sb, NativeMethods.MAX_PATH);
255bool result = UnsafeNativeMethods.GetClientRect(hwnd, ref rc);
272bool result = UnsafeNativeMethods.GetComboBoxInfo(hwnd, ref cbi);
286bool result = (System.Environment.OSVersion.Version.Major >= 6) ? UnsafeNativeMethods.GetPhysicalCursorPos(ref pt)
287: UnsafeNativeMethods.GetCursorPos(ref pt);
301IntPtr hdc = UnsafeNativeMethods.GetDC(hwnd);
342UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO info = new UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO
349UnsafeNativeMethods.EnumThreadWndProc enumToolTipWindows = new UnsafeNativeMethods.EnumThreadWndProc(EnumToolTipWindows);
351UnsafeNativeMethods.EnumThreadWindows(threadId, enumToolTipWindows, ref info);
372if (!UnsafeNativeMethods.IsWindow(hwnd))
379if (hwndParent == IntPtr.Zero || hwndParent == UnsafeNativeMethods.GetDesktopWindow())
408int style = UnsafeNativeMethods.GetWindowLong(peer, NativeMethods.GWL_STYLE, out error);
438int count = UnsafeNativeMethods.GetMenuItemCount(hmenu);
451bool result = UnsafeNativeMethods.GetMenuItemInfo(hmenu, item, byPosition, ref menuItemInfo);
464bool result = UnsafeNativeMethods.GetMenuItemRect(hwnd, hmenu, item, out rc);
477int result = UnsafeNativeMethods.GetMessage(ref msg, hwnd, msgFilterMin, msgFilterMax);
491int result = UnsafeNativeMethods.GetObjectW(hObject, size, ref lf);
517bool result = UnsafeNativeMethods.GetScrollBarInfo(hwnd, fnBar, ref sbi);
530bool result = UnsafeNativeMethods.GetScrollInfo(hwnd, fnBar, ref si);
579memAddr = VirtualAlloc(IntPtr.Zero, new UIntPtr(cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE);
582VirtualAlloc(new IntPtr((byte *)memAddr.ToPointer() + cbSize - pageSize), new UIntPtr(pageSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_NOACCESS);
608VirtualFree(memAddr, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE);
630int exstyle = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_EXSTYLE, out lastWin32Error);
644int id = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_ID, out lastWin32Error);
660int result = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_HWNDPARENT, out lastWin32Error);
672bool result = UnsafeNativeMethods.GetWindowRect(hwnd, ref rc);
686int style = UnsafeNativeMethods.GetWindowLong(hwnd, NativeMethods.GWL_STYLE, out lastWin32Error);
699uint threadId = UnsafeNativeMethods.GetWindowThreadProcessId(hwnd, out processId);
711short atom = UnsafeNativeMethods.GlobalAddAtom(atomName);
879bool result = UnsafeNativeMethods.IsWow64Process(hProcess, out Wow64Process);
954bool mouseSwapped = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SWAPBUTTON) != 0;
984terminationEvent = UnsafeNativeMethods.MsgWaitForMultipleObjects(0, null, waitAll, milliseconds, wakeMask);
994terminationEvent = UnsafeNativeMethods.MsgWaitForMultipleObjects(1, handles, waitAll, milliseconds, wakeMask);
1014IntPtr processHandle = UnsafeNativeMethods.OpenProcess(flags, inherit, processId);
1025processHandle = UnsafeNativeMethods.GetProcessHandleFromHwnd(hwnd);
1046bool result = UnsafeNativeMethods.PostMessage(hwnd, msg, wParam, lParam);
1081bool result = UnsafeNativeMethods.GetGUIThreadInfo(idThread, ref gui);
1176internal static bool ProxyGetTitleBarInfo(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFO ti)
1178ti = new UnsafeNativeMethods.TITLEBARINFO();
1181bool result = UnsafeNativeMethods.GetTitleBarInfo(hwnd, ref ti);
1192internal static bool ProxyGetTitleBarInfoEx(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFOEX ti)
1194ti = new UnsafeNativeMethods.TITLEBARINFOEX();
1197IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1222UnsafeNativeMethods.TITLEBARINFO ti;
1252IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1280IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1306IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, sb, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1332IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, ref lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1347IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, out wParam, out lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result);
1383bool result = UnsafeNativeMethods.ReadProcessMemory(hProcess, source, dest, size, out bytesRead);
1396bool result = UnsafeNativeMethods.ReadProcessMemory(hProcess, source, destAddress, size, out bytesRead);
1412uint result = UnsafeNativeMethods.RealGetWindowClass(hwnd, className, NativeMethods.MAX_PATH);
1426bool result = UnsafeNativeMethods.RegisterHotKey(hwnd, atom, modifiers, vk);
1440return UnsafeNativeMethods.ReleaseDC(hwnd, hdc);
1460return UnsafeNativeMethods.SelectObject(hdc, hObject);
1465int eventCount = UnsafeNativeMethods.SendInput(inputs, ref ki, size);
1507if (UnsafeNativeMethods.SetForegroundWindow(hwnd))
1537bool fShiftDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_SHIFT) & unchecked((int)0x80000000)) != 0;
1538bool fAltDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_MENU) & unchecked((int)0x80000000)) != 0;
1539bool fCtrlDown = (UnsafeNativeMethods.GetAsyncKeyState(UnsafeNativeMethods.VK_CONTROL) & unchecked((int)0x80000000)) != 0;
1542Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_SHIFT, false);
1545Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_MENU, false);
1548Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_CONTROL, false);
1555Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_SHIFT, true);
1558Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_MENU, true);
1561Input.SendKeyboardInputVK(UnsafeNativeMethods.VK_CONTROL, true);
1577UnsafeNativeMethods.TranslateMessage(ref msg);
1583UnsafeNativeMethods.DispatchMessage(ref msg);
1596return UnsafeNativeMethods.SetForegroundWindow(hwnd);
1621return UnsafeNativeMethods.SetWinEventHook(eventMin, eventMax, hmodWinEventProc, WinEventReentrancyFilter, idProcess, idThread, dwFlags);
1714return UnsafeNativeMethods.UnhookWinEvent(winEventHook);
1732bool result = UnsafeNativeMethods.UnregisterHotKey(hwnd, atom);
1745IntPtr result = UnsafeNativeMethods.VirtualAlloc(address, size, allocationType, protect);
1758IntPtr result = UnsafeNativeMethods.VirtualAllocEx(hProcess, address, size, allocationType, protect);
1771bool result = UnsafeNativeMethods.VirtualFree(address, size, freeType);
1784bool result = UnsafeNativeMethods.VirtualFreeEx(hProcess, address, size, freeType);
1797bool result = UnsafeNativeMethods.WriteProcessMemory(hProcess, dest, sourceAddress, size, out bytesWritten);
1891private static bool EnumToolTipWindows(IntPtr hwnd, ref UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO lParam)
1937UnsafeNativeMethods.GetSystemInfo(out sysInfo);
1973UnsafeNativeMethods.TITLEBARINFO tiDL;
1990int buttonWidth = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSIZE) - 1;
1991int buttonHeight = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSIZE) - 1;
2044UnsafeNativeMethods.TITLEBARINFOEX ti;
MS\Internal\AutomationProxies\WindowsMenu.cs (28)
162hmenu = UnsafeNativeMethods.GetMenu(hwnd);
264IntPtr hSubMenu = UnsafeNativeMethods.GetSubMenu(hmenu, i);
309IntPtr hmenu = UnsafeNativeMethods.GetMenu(gui.hwndActive);
596IntPtr hMenuPossibleParent = UnsafeNativeMethods.GetMenu (gui.hwndActive);
687if (UnsafeNativeMethods.GetSubMenu (hmenuPossibleParent, i) == hmenuChild)
817UnsafeNativeMethods.TITLEBARINFO ti;
882return UnsafeNativeMethods.GetSubMenu(mbi.hMenu, 0);
920int state = UnsafeNativeMethods.GetMenuState(hmenu, i, NativeMethods.MF_BYPOSITION);
1261UnsafeNativeMethods.TITLEBARINFO ti;
1416return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero;
1508while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
1598IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item);
1617IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item);
1866return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE);
1881return Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_CHECKED);
1983IntPtr submenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item);
2036short convert = UnsafeNativeMethods.VkKeyScan (hotKey);
2135IntPtr hSubmenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item);
2197for (item = 0; item < cItems && !Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE); item++)
2332while (!Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE) &&
2363if (Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, i, NativeMethods.MF_BYPOSITION), NativeMethods.MF_HILITE))
2397(IntPtr.Zero != UnsafeNativeMethods.GetSubMenu (_hmenu, 0)) &&
2398Misc.IsBitSet(UnsafeNativeMethods.GetMenuState(_hmenu, 0, NativeMethods.MF_BYPOSITION), NativeMethods.MF_BITMAP))
2503int result = UnsafeNativeMethods.GetMenuItemID(_hmenu, _item);
2535int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION);
2544if (UnsafeNativeMethods.GetMenuString(_hmenu, _item, strbldr, length + 1, NativeMethods.MF_BYPOSITION) == length)
2648int state = UnsafeNativeMethods.GetMenuState(_hmenu, _item, NativeMethods.MF_BYPOSITION);