如何检测和禁用Windows 7虚拟wifi适配器 [英] How to detect and disable Windows 7 virtual wifi adapter

查看:184
本文介绍了如何检测和禁用Windows 7虚拟wifi适配器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows 7具有一项(全新的)新功能,称为虚拟无线适配器".在这里阅读有关内容:

Windows 7 has a (neat?) new feature called a 'virtual wireless adapter'. Read about it here:

http://www. istartedsomething.com/20090516/windows-7-native-virtual-wifi-technology-microsoft-research/

我有一个使用本机Wifi API直接控制Windows wifi接口卡的应用程序(

I have an application that directly controls the windows wifi interface card using the Native Wifi API ( http://msdn.microsoft.com/en-us/library/ms706556%28VS.85%29.aspx ). Please take as a given for this question that I need to directly control the wifi adapter using this documented api and can't just leave it up to OS and user.

Windows 7虚拟适配器应该包含在任何已批准的Windows 7 wifi驱动程序中.现在那里的驱动程序似乎有很多漏洞,我发现除非手动禁用虚拟wifi适配器,否则在WLAN api的命令下,真正的适配器将无法可靠地连接到无线访问点.

The Windows 7 virtual adapter is supposed to be included with any approved Windows 7 wifi drivers. The drivers that out there now seem to be pretty buggy, and I've found that unless I manually disable the virtual wifi adapter the real adapter will not reliably connect to a wireless access point when commanded by the WLAN api.

我的主要问题是如何检测Windows虚拟wifi适配器的存在?"

请注意,WlanEnumInterfaces的文档说:

Note that the documentation for WlanEnumInterfaces says:

此虚拟设备通常显示 在网络连接文件夹"中 无线网络连接2",其中包含 "Microsoft虚拟WiFi"的设备名称 微型端口适配器"(如果计算机具有 一个无线网络适配器. 使用了该虚拟设备 专用于执行软件 接入点(SoftAP)连接和 在返回的列表中不存在 WlanEnumInterfaces函数

This virtual device normally shows up in the "Network Connections Folder" as ‘Wireless Network Connection 2’ with a Device Name of ‘Microsoft Virtual WiFi Miniport adapter’ if the computer has a single wireless network adapter. This virtual device is used exclusively for performing software access point (SoftAP) connections and is not present in the list returned by the WlanEnumInterfaces function .

我怀疑有可能提供控制面板用来显示虚拟适配器的枚举的shell api.

I suspect there is shell api that might provide the enumeration that the control panel uses to display the virtual adapter.

要获得额外的信用,我如何以编程方式禁用此适配器?

For extra credit, how can I disable this adapter programatically?

谢谢.

推荐答案

要检测具有WLAN api的Windows 7虚拟适配器,您需要使用Windows SDK版本6.1中wlanapi.h定义的版本.

To detect the Windows 7 virtual adapter with the WLAN api you need to use the version defined by wlanapi.h in Windows SDK version 6.1.

您可以使用WMI或netcon.h中定义的INetConnection COM接口来启用或禁用网络适配器.

You can enable or disable network adapters by using WMI or the INetConnection COM interface defined in netcon.h .

这篇关于如何检测和禁用Windows 7虚拟wifi适配器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆