title: wlanAPI on Windows XP SP3
body: <p>My WPF application is using ManagedWifi to manually control the wifi adapter to connect to a specified network. However, when I run the application on Windows XP, I keep getting Win32Exception: The request is not supported (Native Error code 50).</p>
  
  <p>The system that I was testing used Windows XP SP3, and I'm pretty sure that Windows XP SP3 supports NativeWifi:</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/ms706556(v=vs.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms706556(v=vs.85).aspx</a></p>
  
  <p>This is the profile I'm using for the connection:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"&gt;
      &lt;name&gt;Louis_flucard&lt;/name&gt;
      &lt;SSIDConfig&gt;
          &lt;SSID&gt;
              &lt;hex&gt;4C6F7569735F666C7563617264&lt;/hex&gt;
              &lt;name&gt;Louis_flucard&lt;/name&gt;
          &lt;/SSID&gt;
      &lt;/SSIDConfig&gt;
      &lt;connectionType&gt;IBSS&lt;/connectionType&gt;
      &lt;connectionMode&gt;manual&lt;/connectionMode&gt;
      &lt;MSM&gt;
          &lt;security&gt;
              &lt;authEncryption&gt;
                  &lt;authentication&gt;open&lt;/authentication&gt;
                  &lt;encryption&gt;none&lt;/encryption&gt;
                  &lt;useOneX&gt;false&lt;/useOneX&gt;
              &lt;/authEncryption&gt;
          &lt;/security&gt;
      &lt;/MSM&gt;
  &lt;/WLANProfile&gt;
  </code></pre>
  
  <p>And this is the code section that I used to connect to the wireless network:</p>
  
  <pre><code>//profileXml is basically the Xml file above
  wlanIface.SetProfile(Wlan.WlanProfileFlags.AllUser, profileXml, true);
  wlanIface.Connect(Wlan.WlanConnectionMode.Profile, Wlan.Dot11BssType.Any, profileName);
  </code></pre>
  
  <p>Any help would be appreciated. Thank you.</p>
  
  <p>EDIT: add tag c++. This should be relevant since C/C++ can also work with Native Wifi.</p>