[英]wlanAPI on Windows XP SP3
My WPF application is using ManagedWifi to manually control the wifi adapter to connect to a specified network. 我的WPF应用程序正在使用ManagedWifi来手动控制wifi适配器以连接到指定的网络。 However, when I run the application on Windows XP, I keep getting Win32Exception: The request is not supported (Native Error code 50).
但是,当我在Windows XP上运行该应用程序时,我不断收到Win32Exception:不支持该请求(本机错误代码50)。
The system that I was testing used Windows XP SP3, and I'm pretty sure that Windows XP SP3 supports NativeWifi: 我正在测试的系统使用的是Windows XP SP3,并且我非常确定Windows XP SP3支持NativeWifi:
http://msdn.microsoft.com/en-us/library/ms706556(v=vs.85).aspx http://msdn.microsoft.com/zh-CN/library/ms706556(v=vs.85).aspx
This is the profile I'm using for the connection: 这是我用于连接的配置文件:
<?xml version="1.0"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
<name>Louis_flucard</name>
<SSIDConfig>
<SSID>
<hex>4C6F7569735F666C7563617264</hex>
<name>Louis_flucard</name>
</SSID>
</SSIDConfig>
<connectionType>IBSS</connectionType>
<connectionMode>manual</connectionMode>
<MSM>
<security>
<authEncryption>
<authentication>open</authentication>
<encryption>none</encryption>
<useOneX>false</useOneX>
</authEncryption>
</security>
</MSM>
</WLANProfile>
And this is the code section that I used to connect to the wireless network: 这是我用来连接到无线网络的代码部分:
//profileXml is basically the Xml file above
wlanIface.SetProfile(Wlan.WlanProfileFlags.AllUser, profileXml, true);
wlanIface.Connect(Wlan.WlanConnectionMode.Profile, Wlan.Dot11BssType.Any, profileName);
Any help would be appreciated. 任何帮助,将不胜感激。 Thank you.
谢谢。
EDIT: add tag c++. 编辑:添加标签c ++。 This should be relevant since C/C++ can also work with Native Wifi.
这应该是相关的,因为C / C ++也可以与Native Wifi一起使用。
IIRC the WlanConnect call isn't supported on XP. XP上不支持IIRC WlanConnect呼叫。 See the list of supported APIs at http://msdn.microsoft.com/en-us/library/windows/desktop/bb204766(v=vs.85).aspx .
请参阅http://msdn.microsoft.com/zh-cn/library/windows/desktop/bb204766(v=vs.85).aspx上受支持的API列表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.