简体   繁体   English

Windows XP SP3上的wlanAPI

[英]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.

相关问题 DllImport在Windows XP SP3上失败,但在Windows 7上工作 - DllImport fails on windows XP SP3 but works on windows 7 如何在Windows XP SP3中创建SFTP服务? - How to create SFTP service in Windows xp sp3? 在C#中为Windows 7和Xp Sp3控制Windows防火墙 - Controlling Windows Firewall in C# for Windows 7 and Xp Sp3 在Windows XP SP3上启动Windows服务时出现问题 - Problems with starting windows service on windows xp SP3 JsonConvert.SerializeObject在Windows XP SP3中崩溃 - JsonConvert.SerializeObject is crashing in windows Xp sp3 如何使用 C# 或免费的 XP 工具卸载或删除 Windows XP Sp3 游戏? - How can I uninstall or delete Windows XP Sp3 Games using C# or free XP tools? 使用VS2012开发的Windows应用程序未在Windows XP SP3中运行 - Windows application developed using VS2012 is not running in windows XP SP3 Windows窗体在Windows Xp sp3上安装时询问.Net Framework 4.5 - Windows Form asking .Net framework 4.5 while installing on Windows Xp sp3 在Windows XP sp3上安装SQL Server 2008 Express会导致错误(.netframework 2) - Install SQL Server 2008 Express on Windows XP sp3 causes an error (.netframework 2) 带有.NET Framework 4.0的Windows XP SP3上的.NET Framework 3.0应用程序 - .NET Framework 3.0 App on Windows XP SP3 with .NET Framework 4.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM