Native Wifi API Sample
A Native Wifi API sample that demonstrates the use of basic wireless network management functions is included with the Microsoft Windows Software Development Kit (SDK). The latest version of the Windows SDK is available from the Download Center.
By default, the Native Wifi sample source code is installed in the following directory:
C:\Program Files\Microsoft SDKs\Windows\<version number>\Samples\NetDs\Wlan
The Native Wifi API sample is located under the following folder:
The Native Wifi sample can be compiled and run on Windows Vista and later, Windows XP with Service Pack 3 (SP3), and Wireless LAN API for Windows XP with Service Pack 2 (SP2). Some features of the sample are not supported on Windows XP with SP3 and Wireless LAN API for Windows XP with SP2. For a list of functions supported by Windows XP with SP3 and Wireless LAN API for Windows XP with SP2, see Native Wifi API Support on Windows XP.
The Native Wifi sample demonstrates how to perform the following tasks:
- Enumerate wireless interfaces. See WlanEnumInterfaces.
- Get the capabilities of an interface. See WlanGetInterfaceCapability.
Windows XP with SP3 and Wireless LAN API for Windows XP with SP2: This feature is not supported.
- Query an interface. See WlanQueryInterface.
- Set parameters for a network interface. See WlanSetInterface. This function can be used to turn the wireless radio on and off (and therefore enable or disable wireless network connectivity).
- Scan for available wireless networks. See WlanScan.
- Get the list of available or visible wireless networks. See WlanGetAvailableNetworkList.
- Get, save, or delete a profile. See WlanGetProfile, WlanSetProfile, and WlanDeleteProfile.
- Connect to or disconnect from a wireless network. See WlanConnect and WlanDisconnect.
- Using Native Wifi
- Windows Vista Wireless SDK Forum
- Troubleshooting Windows Vista 802.11 Wireless Connections