32 references to NativeMethods
Microsoft.VisualStudio.LanguageServices.New.IntegrationTests (32)
InProcess\InputInProcess.cs (5)
133
var horizontalResolution =
NativeMethods
.GetSystemMetrics(
NativeMethods
.SM_CXSCREEN);
134
var verticalResolution =
NativeMethods
.GetSystemMetrics(
NativeMethods
.SM_CYSCREEN);
140
var actualPoint =
NativeMethods
.GetCursorPos();
IntegrationHelper.cs (27)
73
foregroundWindow =
NativeMethods
.GetForegroundWindow();
91
if ((
NativeMethods
.GetParent(topLevelWindow) == parentWindow) ||
92
(
NativeMethods
.GetWindow(topLevelWindow,
NativeMethods
.GW_OWNER) == parentWindow) ||
93
(
NativeMethods
.GetAncestor(topLevelWindow,
NativeMethods
.GA_PARENT) == parentWindow))
123
var titleLength =
NativeMethods
.SendMessage(window,
NativeMethods
.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero);
132
NativeMethods
.SendMessage(window,
NativeMethods
.WM_GETTEXT, (IntPtr)(title.Capacity), title);
140
var enumFunc = new
NativeMethods
.WNDENUMPROC((hWnd, lParam) =>
146
var success =
NativeMethods
.EnumWindows(enumFunc, IntPtr.Zero);
181
var activeWindow =
NativeMethods
.GetLastActivePopup(window);
182
activeWindow =
NativeMethods
.IsWindowVisible(activeWindow) ? activeWindow : window;
183
NativeMethods
.SwitchToThisWindow(activeWindow, true);
185
if (!
NativeMethods
.SetForegroundWindow(activeWindow))
187
if (!
NativeMethods
.AllocConsole())
194
var consoleWindow =
NativeMethods
.GetConsoleWindow();
200
if (!
NativeMethods
.SetWindowPos(consoleWindow, IntPtr.Zero, 0, 0, 0, 0,
NativeMethods
.SWP_NOZORDER))
207
if (!
NativeMethods
.FreeConsole())
213
if (!
NativeMethods
.SetForegroundWindow(activeWindow))
222
public static void SendInput(
NativeMethods
.INPUT[] inputs)
226
var eventsInserted =
NativeMethods
.SendInput((uint)inputs.Length, inputs,
NativeMethods
.SizeOf_INPUT);
256
NativeMethods
.GetRunningObjectTable(0, out var runningObjectTable);
258
NativeMethods
.CreateBindCtx(0, out var bindContext);