microsoft/TypeAgent

Public

mirrored fromhttps://github.com/microsoft/TypeAgentAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
af80c8ee50697aae53886fa72bf64e2e856f14a4

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

dotnet/autoShell/AutoShell_Win32.cs

515lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4using System;
5using System.Collections.Generic;
6using System.Linq;
7using System.Runtime.InteropServices;
8using System.Text;
9using System.Threading.Tasks;
10using System.Windows;
11
12namespace autoShell
13{
14 internal unsafe partial class AutoShell
15 {
16 private const int SPI_SETDESKWALLPAPER = 20;
17 private const int SPIF_UPDATEINIFILE = 0x01;
18 private const int SPIF_SENDCHANGE = 0x02;
19 private const uint LOAD_LIBRARY_AS_DATAFILE = 0x00000002;
20
21 // Text scaling constants
22 private const uint WM_SETTINGCHANGE = 0x001A;
23 private static readonly IntPtr HWND_BROADCAST = new IntPtr(0xffff);
24
25 // window rect structure
26 internal struct RECT
27 {
28 public int Left; // x position of upper-left corner
29 public int Top; // y position of upper-left corner
30 public int Right; // x position of lower-right corner
31 public int Bottom; // y position of lower-right corner
32 }
33
34 internal struct Size
35 {
36 public int x;
37 public int y;
38 }
39
40 // import GetWindowRect
41 [DllImport("user32.dll")]
42 static extern bool GetWindowRect(IntPtr hWnd, ref RECT Rect);
43
44 // import GetShellWindow
45 [DllImport("user32.dll")]
46 static extern IntPtr GetShellWindow();
47
48 // import GetDesktopWindow
49 [DllImport("user32.dll")]
50 static extern IntPtr GetDesktopWindow();
51
52 // import SetForegroundWindow
53 [System.Runtime.InteropServices.DllImport("user32.dll")]
54 private static extern bool SetForegroundWindow(IntPtr hWnd);
55
56 [DllImport("user32.dll", EntryPoint = "SendMessage", SetLastError = true)]
57 static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, UInt32 wParam, IntPtr lParam);
58
59 [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
60 static extern IntPtr SendMessageTimeout(
61 IntPtr hWnd,
62 uint Msg,
63 IntPtr wParam,
64 string lParam,
65 uint fuFlags,
66 uint uTimeout,
67 out IntPtr lpdwResult);
68
69 // import SetWindowPos
70 [DllImport("user32.dll")]
71 static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
72
73 // import FindWindowEx
74 [DllImport("user32.dll")]
75 internal static extern IntPtr FindWindowEx(IntPtr hWndParent, IntPtr hWndChildAfter, string lpClassName, string lpWindowName);
76
77 [DllImport("user32.dll", CharSet = CharSet.Auto)]
78 private static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni);
79
80 [System.Runtime.InteropServices.DllImport("kernel32.dll", SetLastError = true)]
81 private static extern IntPtr LoadLibraryEx(string lpFileName, IntPtr hFile, uint dwFlags);
82
83 [System.Runtime.InteropServices.DllImport("kernel32.dll", SetLastError = true)]
84 private static extern bool FreeLibrary(IntPtr hModule);
85
86 [System.Runtime.InteropServices.DllImport("user32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto)]
87 private static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax);
88
89 #region Virtual Desktop APIs
90
91 public enum APPLICATION_VIEW_CLOAK_TYPE : int
92 {
93 AVCT_NONE = 0,
94 AVCT_DEFAULT = 1,
95 AVCT_VIRTUAL_DESKTOP = 2
96 }
97
98 public enum APPLICATION_VIEW_COMPATIBILITY_POLICY : int
99 {
100 AVCP_NONE = 0,
101 AVCP_SMALL_SCREEN = 1,
102 AVCP_TABLET_SMALL_SCREEN = 2,
103 AVCP_VERY_SMALL_SCREEN = 3,
104 AVCP_HIGH_SCALE_FACTOR = 4
105 }
106
107 // Virtual Desktop COM Interface GUIDs
108 public static readonly Guid CLSID_ImmersiveShell = new Guid("C2F03A33-21F5-47FA-B4BB-156362A2F239");
109 public static readonly Guid CLSID_VirtualDesktopManagerInternal = new Guid("C5E0CDCA-7B6E-41B2-9FC4-D93975CC467B");
110 public static readonly Guid CLSID_VirtualDesktopManager = new Guid("AA509086-5CA9-4C25-8F95-589D3C07B48A");
111 public static readonly Guid CLSID_VirtualDesktopPinnedApps = new Guid("B5A399E7-1C87-46B8-88E9-FC5747B171BD");
112
113 // IServiceProvider COM Interface
114 [ComImport]
115 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
116 [Guid("6D5140C1-7436-11CE-8034-00AA006009FA")]
117 private interface IServiceProvider
118 {
119 [return: MarshalAs(UnmanagedType.IUnknown)]
120 void QueryService(ref Guid guidService, ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObject);
121 }
122
123 // IVirtualDesktopManager COM Interface
124 [ComImport]
125 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
126 [Guid("A5CD92FF-29BE-454C-8D04-D82879FB3F1B")]
127 internal interface IVirtualDesktopManager
128 {
129 bool IsWindowOnCurrentVirtualDesktop(IntPtr topLevelWindow);
130 Guid GetWindowDesktopId(IntPtr topLevelWindow);
131 void MoveWindowToDesktop(IntPtr topLevelWindow, ref Guid desktopId);
132 }
133
134 // IVirtualDesktop COM Interface (Windows 10/11)
135 [ComImport]
136 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
137 [Guid("3F07F4BE-B107-441A-AF0F-39D82529072C")]
138 internal interface IVirtualDesktop
139 {
140 bool IsViewVisible(IApplicationView view);
141 Guid GetId();
142 // TODO: proper HSTRING custom marshaling
143 [return: MarshalAs(UnmanagedType.HString)]
144 string GetName();
145 [return: MarshalAs(UnmanagedType.HString)]
146 string GetWallpaperPath();
147 bool IsRemote();
148 }
149
150 // IVirtualDesktopManagerInternal COM Interface
151 [ComImport]
152 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
153 [Guid("53F5CA0B-158F-4124-900C-057158060B27")]
154 internal interface IVirtualDesktopManagerInternal_BUGBUG
155 {
156 int GetCount();
157 void MoveViewToDesktop(IApplicationView view, IVirtualDesktop desktop);
158 bool CanViewMoveDesktops(IApplicationView view);
159 IVirtualDesktop GetCurrentDesktop();
160 void GetDesktops(out IObjectArray desktops);
161 [PreserveSig]
162 int GetAdjacentDesktop(IVirtualDesktop from, int direction, out IVirtualDesktop desktop);
163 void SwitchDesktop(IVirtualDesktop desktop);
164 IVirtualDesktop CreateDesktop();
165 void MoveDesktop(IVirtualDesktop desktop, int nIndex);
166 void RemoveDesktop(IVirtualDesktop desktop, IVirtualDesktop fallback);
167 IVirtualDesktop FindDesktop(ref Guid desktopid);
168 void GetDesktopSwitchIncludeExcludeViews(IVirtualDesktop desktop, out IObjectArray unknown1, out IObjectArray unknown2);
169 void SetDesktopName(IVirtualDesktop desktop, [MarshalAs(UnmanagedType.HString)] string name);
170 void SetDesktopWallpaper(IVirtualDesktop desktop, [MarshalAs(UnmanagedType.HString)] string path);
171 void UpdateWallpaperPathForAllDesktops([MarshalAs(UnmanagedType.HString)] string path);
172 void CopyDesktopState(IApplicationView pView0, IApplicationView pView1);
173 void CreateRemoteDesktop([MarshalAs(UnmanagedType.HString)] string path, out IVirtualDesktop desktop);
174 void SwitchRemoteDesktop(IVirtualDesktop desktop, IntPtr switchtype);
175 void SwitchDesktopWithAnimation(IVirtualDesktop desktop);
176 void GetLastActiveDesktop(out IVirtualDesktop desktop);
177 void WaitForAnimationToComplete();
178 }
179
180 // IVirtualDesktopManagerInternal COM Interface
181 [ComImport]
182 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
183 [Guid("53F5CA0B-158F-4124-900C-057158060B27")]
184 internal interface IVirtualDesktopManagerInternal
185 {
186 int GetCount();
187 void MoveViewToDesktop(IApplicationView view, IVirtualDesktop desktop);
188 bool CanViewMoveDesktops(IApplicationView view);
189 IVirtualDesktop GetCurrentDesktop();
190 void GetDesktops(out IObjectArray desktops);
191 [PreserveSig]
192 int GetAdjacentDesktop(IVirtualDesktop from, int direction, out IVirtualDesktop desktop);
193 void SwitchDesktop(IVirtualDesktop desktop);
194 void SwitchDesktopAndMoveForegroundView(IVirtualDesktop desktop);
195 IVirtualDesktop CreateDesktop();
196 void MoveDesktop(IVirtualDesktop desktop, int nIndex);
197 void RemoveDesktop(IVirtualDesktop desktop, IVirtualDesktop fallback);
198 IVirtualDesktop FindDesktop(ref Guid desktopid);
199 void GetDesktopSwitchIncludeExcludeViews(IVirtualDesktop desktop, out IObjectArray unknown1, out IObjectArray unknown2);
200 void SetDesktopName(IVirtualDesktop desktop, [MarshalAs(UnmanagedType.HString)] string name);
201 void SetDesktopWallpaper(IVirtualDesktop desktop, [MarshalAs(UnmanagedType.HString)] string path);
202 void UpdateWallpaperPathForAllDesktops([MarshalAs(UnmanagedType.HString)] string path);
203 void CopyDesktopState(IApplicationView pView0, IApplicationView pView1);
204 void CreateRemoteDesktop([MarshalAs(UnmanagedType.HString)] string path, out IVirtualDesktop desktop);
205 void SwitchRemoteDesktop(IVirtualDesktop desktop, IntPtr switchtype);
206 void SwitchDesktopWithAnimation(IVirtualDesktop desktop);
207 void GetLastActiveDesktop(out IVirtualDesktop desktop);
208 void WaitForAnimationToComplete();
209 }
210
211 // IObjectArray COM Interface
212 [ComImport]
213 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
214 [Guid("92CA9DCD-5622-4BBA-A805-5E9F541BD8C9")]
215 internal interface IObjectArray
216 {
217 void GetCount(out int pcObjects);
218 void GetAt(int uiIndex, ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv);
219 }
220
221 [ComImport]
222 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
223 [Guid("372E1D3B-38D3-42E4-A15B-8AB2B178F513")]
224 internal interface IApplicationView
225 {
226 int SetFocus();
227 int SwitchTo();
228 int TryInvokeBack(IntPtr /* IAsyncCallback* */ callback);
229 int humbnailWindow(out IntPtr hwnd);
230 int GetMonitor(out IntPtr /* IImmersiveMonitor */ immersiveMonitor);
231 int GetVisibility(out int visibility);
232 int SetCloak(APPLICATION_VIEW_CLOAK_TYPE cloakType, int unknown);
233 int GetPosition(ref Guid guid /* GUID for IApplicationViewPosition */, out IntPtr /* IApplicationViewPosition** */ position);
234 int SetPosition(ref IntPtr /* IApplicationViewPosition* */ position);
235 int InsertAfterWindow(IntPtr hwnd);
236 int GetExtendedFramePosition(out Rect rect);
237 int GetAppUserModelId([MarshalAs(UnmanagedType.LPWStr)] out string id);
238 int SetAppUserModelId(string id);
239 int IsEqualByAppUserModelId(string id, out int result);
240 int GetViewState(out uint state);
241 int SetViewState(uint state);
242 int GetNeediness(out int neediness);
243 int GetLastActivationTimestamp(out ulong timestamp);
244 int SetLastActivationTimestamp(ulong timestamp);
245 int GetVirtualDesktopId(out Guid guid);
246 int SetVirtualDesktopId(ref Guid guid);
247 int GetShowInSwitchers(out int flag);
248 int SetShowInSwitchers(int flag);
249 int GetScaleFactor(out int factor);
250 int CanReceiveInput(out bool canReceiveInput);
251 int GetCompatibilityPolicyType(out APPLICATION_VIEW_COMPATIBILITY_POLICY flags);
252 int SetCompatibilityPolicyType(APPLICATION_VIEW_COMPATIBILITY_POLICY flags);
253 int GetSizeConstraints(IntPtr /* IImmersiveMonitor* */ monitor, out Size size1, out Size size2);
254 int GetSizeConstraintsForDpi(uint uint1, out Size size1, out Size size2);
255 int SetSizeConstraintsForDpi(ref uint uint1, ref Size size1, ref Size size2);
256 int OnMinSizePreferencesUpdated(IntPtr hwnd);
257 int ApplyOperation(IntPtr /* IApplicationViewOperation* */ operation);
258 int IsTray(out bool isTray);
259 int IsInHighZOrderBand(out bool isInHighZOrderBand);
260 int IsSplashScreenPresented(out bool isSplashScreenPresented);
261 int Flash();
262 int GetRootSwitchableOwner(out IApplicationView rootSwitchableOwner);
263 int EnumerateOwnershipTree(out IObjectArray ownershipTree);
264 int GetEnterpriseId([MarshalAs(UnmanagedType.LPWStr)] out string enterpriseId);
265 int IsMirrored(out bool isMirrored);
266 int Unknown1(out int unknown);
267 int Unknown2(out int unknown);
268 int Unknown3(out int unknown);
269 int Unknown4(out int unknown);
270 int Unknown5(out int unknown);
271 int Unknown6(int unknown);
272 int Unknown7();
273 int Unknown8(out int unknown);
274 int Unknown9(int unknown);
275 int Unknown10(int unknownX, int unknownY);
276 int Unknown11(int unknown);
277 int Unknown12(out Size size1);
278 }
279
280 [ComImport]
281 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
282 [Guid("1841C6D7-4F9D-42C0-AF41-8747538F10E5")]
283 internal interface IApplicationViewCollection
284 {
285 int GetViews(out IObjectArray array);
286 int GetViewsByZOrder(out IObjectArray array);
287 int GetViewsByAppUserModelId(string id, out IObjectArray array);
288 int GetViewForHwnd(IntPtr hwnd, out IApplicationView view);
289 int GetViewForApplication(object application, out IApplicationView view);
290 int GetViewForAppUserModelId(string id, out IApplicationView view);
291 int GetViewInFocus(out IntPtr view);
292 int Unknown1(out IntPtr view);
293 void RefreshCollection();
294 int RegisterForApplicationViewChanges(object listener, out int cookie);
295 int UnregisterForApplicationViewChanges(int cookie);
296 }
297
298 [ComImport]
299 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
300 [Guid("4CE81583-1E4C-4632-A621-07A53543148F")]
301 internal interface IVirtualDesktopPinnedApps
302 {
303 bool IsAppIdPinned(string appId);
304 void PinAppID(string appId);
305 void UnpinAppID(string appId);
306 bool IsViewPinned(IApplicationView applicationView);
307 void PinView(IApplicationView applicationView);
308 void UnpinView(IApplicationView applicationView);
309 }
310
311 [ComImport]
312 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
313 [Guid("6D5140C1-7436-11CE-8034-00AA006009FA")]
314 internal interface IServiceProvider10
315 {
316 [return: MarshalAs(UnmanagedType.IUnknown)]
317 object QueryService(ref Guid service, ref Guid riid);
318 }
319
320 #endregion Virtual Desktop APIs
321
322 [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
323 private static extern IntPtr GetCommandLineW();
324
325
326 #region Window Functions
327
328 // Delegate for EnumWindows callback
329 internal delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
330
331 [DllImport("user32.dll")]
332 [return: MarshalAs(UnmanagedType.Bool)]
333 static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);
334
335 [DllImport("user32.dll", CharSet = CharSet.Unicode)]
336 internal static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
337
338 [DllImport("user32.dll")]
339 [return: MarshalAs(UnmanagedType.Bool)]
340 static extern bool IsWindowVisible(IntPtr hWnd);
341
342 [DllImport("user32.dll")]
343 static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
344
345 // get handle of active window
346 [DllImport("user32.dll")]
347 private static extern IntPtr GetForegroundWindow();
348
349 #endregion Window Functions
350
351 [DllImport("shell32.dll", CharSet = CharSet.Unicode)]
352 private static extern IntPtr ShellExecute(
353 IntPtr hwnd,
354 string lpOperation,
355 string lpFile,
356 string lpParameters,
357 string lpDirectory,
358 int nShowCmd);
359
360
361 [DllImport("combase.dll")]
362 internal static extern int WindowsCreateString(char* sourceString, int length, out IntPtr hstring);
363
364 [DllImport("combase.dll")]
365 internal static extern int WindowsDeleteString(IntPtr hstring);
366
367 [DllImport("combase.dll")]
368 internal static extern char* WindowsGetStringRawBuffer(IntPtr hstring, out uint length);
369
370 // Add these COM interface definitions for Radio Management API
371
372 // GUIDs for Radio Management API
373 internal static readonly Guid CLSID_RadioManagementAPI = new Guid(0x581333f6, 0x28db, 0x41be, 0xbc, 0x7a, 0xff, 0x20, 0x1f, 0x12, 0xf3, 0xf6);
374 internal static readonly Guid IID_IRadioManager = new Guid(0xdb3afbfb, 0x08e6, 0x46c6, 0xaa, 0x70, 0xbf, 0x9a, 0x34, 0xc3, 0x0a, 0xb7);
375
376 [ComImport]
377 [Guid("db3afbfb-08e6-46c6-aa70-bf9a34c30ab7")]
378 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
379 internal interface IRadioManager
380 {
381 [PreserveSig]
382 int IsRMSupported(out uint pdwState);
383
384 [PreserveSig]
385 int GetUIRadioInstances([MarshalAs(UnmanagedType.IUnknown)] out object ppCollection);
386
387 [PreserveSig]
388 int GetSystemRadioState(out int pbEnabled, out int param2, out int pChangeReason);
389
390 [PreserveSig]
391 int SetSystemRadioState(int bEnabled);
392
393 [PreserveSig]
394 int Refresh();
395
396 [PreserveSig]
397 int OnHardwareSliderChange(int param1, int param2);
398 }
399
400 #region WiFi
401
402 // WLAN API P/Invoke declarations
403 [DllImport("wlanapi.dll")]
404 static extern int WlanOpenHandle(uint dwClientVersion, IntPtr pReserved, out uint pdwNegotiatedVersion, out IntPtr phClientHandle);
405
406 [DllImport("wlanapi.dll")]
407 static extern int WlanCloseHandle(IntPtr hClientHandle, IntPtr pReserved);
408
409 [DllImport("wlanapi.dll")]
410 static extern int WlanEnumInterfaces(IntPtr hClientHandle, IntPtr pReserved, out IntPtr ppInterfaceList);
411
412 [DllImport("wlanapi.dll")]
413 static extern int WlanGetAvailableNetworkList(IntPtr hClientHandle, ref Guid pInterfaceGuid, uint dwFlags, IntPtr pReserved, out IntPtr ppAvailableNetworkList);
414
415 [DllImport("wlanapi.dll")]
416 static extern int WlanScan(IntPtr hClientHandle, ref Guid pInterfaceGuid, IntPtr pDot11Ssid, IntPtr pIeData, IntPtr pReserved);
417
418 [DllImport("wlanapi.dll")]
419 static extern void WlanFreeMemory(IntPtr pMemory);
420
421 [DllImport("wlanapi.dll")]
422 static extern int WlanConnect(IntPtr hClientHandle, ref Guid pInterfaceGuid, ref WLAN_CONNECTION_PARAMETERS pConnectionParameters, IntPtr pReserved);
423
424 [DllImport("wlanapi.dll")]
425 static extern int WlanDisconnect(IntPtr hClientHandle, ref Guid pInterfaceGuid, IntPtr pReserved);
426
427 [DllImport("wlanapi.dll")]
428 static extern int WlanSetProfile(IntPtr hClientHandle, ref Guid pInterfaceGuid, uint dwFlags, [MarshalAs(UnmanagedType.LPWStr)] string strProfileXml, [MarshalAs(UnmanagedType.LPWStr)] string strAllUserProfileSecurity, bool bOverwrite, IntPtr pReserved, out uint pdwReasonCode);
429
430 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
431 struct WLAN_INTERFACE_INFO
432 {
433 public Guid InterfaceGuid;
434 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
435 public string strInterfaceDescription;
436 public int isState;
437 }
438
439 [StructLayout(LayoutKind.Sequential)]
440 struct WLAN_INTERFACE_INFO_LIST
441 {
442 public uint dwNumberOfItems;
443 public uint dwIndex;
444 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
445 public WLAN_INTERFACE_INFO[] InterfaceInfo;
446 }
447
448 [StructLayout(LayoutKind.Sequential)]
449 struct DOT11_SSID
450 {
451 public uint SSIDLength;
452 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
453 public byte[] SSID;
454 }
455
456 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
457 struct WLAN_AVAILABLE_NETWORK
458 {
459 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
460 public string strProfileName;
461 public DOT11_SSID dot11Ssid;
462 public int dot11BssType;
463 public uint uNumberOfBssids;
464 public bool bNetworkConnectable;
465 public uint wlanNotConnectableReason;
466 public uint uNumberOfPhyTypes;
467 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
468 public int[] dot11PhyTypes;
469 public bool bMorePhyTypes;
470 public uint wlanSignalQuality;
471 public bool bSecurityEnabled;
472 public int dot11DefaultAuthAlgorithm;
473 public int dot11DefaultCipherAlgorithm;
474 public uint dwFlags;
475 public uint dwReserved;
476 }
477
478 [StructLayout(LayoutKind.Sequential)]
479 struct WLAN_AVAILABLE_NETWORK_LIST
480 {
481 public uint dwNumberOfItems;
482 public uint dwIndex;
483 }
484
485 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
486 struct WLAN_CONNECTION_PARAMETERS
487 {
488 public WLAN_CONNECTION_MODE wlanConnectionMode;
489 [MarshalAs(UnmanagedType.LPWStr)]
490 public string strProfile;
491 public IntPtr pDot11Ssid;
492 public IntPtr pDesiredBssidList;
493 public DOT11_BSS_TYPE dot11BssType;
494 public uint dwFlags;
495 }
496
497 enum WLAN_CONNECTION_MODE
498 {
499 wlan_connection_mode_profile = 0,
500 wlan_connection_mode_temporary_profile = 1,
501 wlan_connection_mode_discovery_secure = 2,
502 wlan_connection_mode_discovery_unsecure = 3,
503 wlan_connection_mode_auto = 4
504 }
505
506 enum DOT11_BSS_TYPE
507 {
508 dot11_BSS_type_infrastructure = 1,
509 dot11_BSS_type_independent = 2,
510 dot11_BSS_type_any = 3
511 }
512
513 #endregion WiFi
514 }
515}
516