<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mincus code &#187; C++</title>
	<atom:link href="http://code.mincus.com/category/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://code.mincus.com</link>
	<description></description>
	<lastBuildDate>Tue, 29 Dec 2009 20:00:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Windows Wireless API</title>
		<link>http://code.mincus.com/31/windows-wireless-api/</link>
		<comments>http://code.mincus.com/31/windows-wireless-api/#comments</comments>
		<pubDate>Mon, 29 Jan 2007 11:00:58 +0000</pubDate>
		<dc:creator>mincus</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://code.mincus.com/31/windows-wireless-api/</guid>
		<description><![CDATA[How to programmatically access the WiFi API (Updated 2007/01/29 with new download paths &#8211; API is now out of beta, thank you Aichi!) After searching for hours and hours I finally found a solution for accessing and changing the windows wireless settings through a programming interface. Using the Wireless Zero Configuration service and the WiFi [...]]]></description>
			<content:encoded><![CDATA[<h1>How to programmatically access the WiFi API</h1>
<p>(Updated 2007/01/29 with new download paths &#8211; API is now out of beta, thank you Aichi!)<br />
After searching for hours and hours I finally found a solution for accessing and changing the windows wireless settings through a programming interface.  Using the Wireless Zero Configuration service and the WiFi Native API I was able to change anything that I wanted to.  This will allow me to programmatically roll out changes to clients WiFi interfaces through logon scripts or on a client to client basis.</p>
<p>Below I documented the steps that are needed to use the program, and I also have shown the steps needed to use the source code which I have released under the GNU GPL for your own projects.  This is my first release of this software, so I encourage you to provide feedback, suggestions, and code!<br />
<span id="more-31"></span><br />
Download the <a href="/programs/wifi_config.zip">wifi config executable</a> &#8211; 636KB for <strong>Windows XP SP2 Only</strong>.</p>
<p>To use wifi_config.exe perform the following steps in this order:</p>
<ol>
<li>Install the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=993C0BCF-3BCF-4009-BE21-27E85E1857B1&#038;displaylang=en">Microsoft Core XML Services (MSXML) 6.0</a></li>
<li>Install <a href="http://support.microsoft.com/?id=893357">KB893357</a></li>
<li>Install the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=52A43BAB-DC4E-413F-AC71-158EFD1ADA50&#038;displaylang=en">WLAN API for Windows XP SP2</a></li>
</ol>
<p>Executable Options:<br />
<strong>-Enable</strong> Enable the wireless interfaces specified by limit.  If no limit specified, enable all wireless interfaces.  This option effectively checks the &#8220;Use Windows to configure my wireless network settings&#8221; checkbox under the Wireless Network Connection Properties.<br />
 <strong>-Add</strong> Path(s) to an XML file containing the information about the Wireless Access point that you wish to setup.<br />
 <strong>-Delete</strong> Access Point name(s) that you wish to remove from the profile list.<br />
 <strong>-Nics</strong> List wireless interfaces by their description and GUID.<br />
 <strong>-Aps</strong> List access points by AP name.<br />
 <strong>-Limit</strong> GUID of the interface(s) to limit the additions, deletions, and access point listings to.  The default is to use all interfaces.<br />
 <strong>-Help</strong> Displays the command line arguments and sample usage (this screen.)</p>
<p>Sample Usage:<br />
Delete access point from all interfaces:<br />
<em>wifi_config.exe -delete SAMPLE-AP</em></p>
<p>Delete multiple access points from a specific interface:<br />
<em>wifi_config.exe -delete SAMPLE-AP1 SAMPLE-AP2 -limit {GUID}</em></p>
<p>Add multiple profiles:<br />
<em>wifi_config.exe -add &#8220;C:\profile1.xml&#8221; &#8220;C:\profile2.xml&#8221;</em></p>
<p>List access points:<br />
<em>wifi_config.exe -aps</em></p>
<p>Microsoft has also provided some <a href="http://msdn2.microsoft.com/en-us/library/aa369853.aspx">sample XML files</a> detailing many common access point configurations.</p>
<h1>For those that wish to compile their own Wifi Config</h1>
<p>Download the <a href="/programs/wifi_config%20source.zip">Wifi Config Source</a> &#8211; 3.53MB</p>
<p>I had much difficulty in actually getting this (or any) Wifi API to function the way I needed it to.</p>
<p>Here are the steps that I took to get this code to work for me:</p>
<p>Using Visual Studio 2005</p>
<ol>
<li>Install the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=993C0BCF-3BCF-4009-BE21-27E85E1857B1&#038;displaylang=en">Microsoft Core XML Services (MSXML) 6.0</a></li>
<li>Install <a href="http://support.microsoft.com/?id=893357">KB893357</a></li>
<p><strong>Install Wireless SDK + API</strong></p>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyid=52A43BAB-DC4E-413F-AC71-158EFD1ADA50&#038;displaylang=en">WLAN API for Windows XP SP2 Beta</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&#038;displaylang=en">WLAN SDK for Windows XP SP2</a></li>
<li>Place wlanapi.h, wlanapi.lib, and wlanapi.dll in your build directory</li>
<li>Add wlanapi.lib to the library includes</li>
<li>Install <a href="http://www.microsoft.com/downloads/details.aspx?familyid=117ecfd3-98ad-4d67-87d2-e95a8407fa86&#038;displaylang=en">Install Vista RC1 SDK</a></li>
<p>http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&#038;displaylang=en</p>
<li>Add the Vista SDK path to your include paths</li>
</ol>
<p>Includes should contain at least the following:<br />
<code>    #define WIN32_LEAN_AND_MEAN<br />
    #include &lt;stdio.h&gt;<br />
    #include &lt;windows.h&gt;<br />
    #include &lt;winnt.h&gt;<br />
    #include "wlanapi.h"</code></p>
<p>Ensure that the following DLLs exist on the target machines or in the run directory of your program -<br />
 For Release:<br />
  &#8211; All from:<br />
<code>"C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://code.mincus.com/31/windows-wireless-api/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

