windows-7 – 如何检测和禁用Windows 7虚拟wifi适配器

Windows 7有一个(整洁的?)新功能称为“虚拟无线适配器”.在这里阅读:

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

我有一个应用程序,使用Native Wifi API直接控制Windows wifi接口卡(http://msdn.microsoft.com/en-us/library/ms706556%28VS.85%29.aspx).请考虑这个问题,我需要使用这个记录的api直接控制wifi适配器,而不能只是将它留给操作系统和用户.

Windows 7虚拟适配器应该包含在任何已批准的Windows 7 wifi驱动程序中.那里的驱动程序现在看起来很漂亮,而且我发现除非我手动禁用虚拟wifi适配器,否则当WLAN api命令时,真正的适配器将无法可靠地连接到无线接入点.

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

请注意,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可能提供控件面板用来显示虚拟适配器的枚举.

为了额外的功劳,我如何以编程方式禁用此适配器?

提前致谢.

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

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

点赞