FAQs API Documentation Download


WRAPI Documentation


Frequently Asked Questions about WRAPI:


1. What is WRAPI?
2. How does WRAPI work?
3. How do I download WRAPI?
4. What do I need to get WRAPI to work on my system?
4. Do I need to write any code to get WRAPI to work?
5. When I free memory that was allocated by WRAPI.dll for DeviceList and AP_List, in my WRAPI application, why do I get an Access Violation error?
6. Does WRAPI work with all vendor hardware?


1. What is WRAPI?

WRAPI 2.0 consists of a set of wireless LAN monitoring tools built for WindowsXP-based systems. The WRAPI software library (wrapi.dll) allows applications running in userspace on mobile end stations to query information about the IEEE 802.11 network they are attached to. WRAPI works with any IEEE 802.11b wireless network hardware vendor.

2. How does WRAPI work?

WRAPI functions obtain information about the wireless LAN using the NDIS User Mode I/O Protocol (NDISUIO).

NDISUIO is a connection-less, NDIS 5.1 compliant protocol driver. It allows user-mode applications to establish and tear-down bindings to network adapters (Ethernet, WLAN etc.) Further, it also supports setting packet filters, sending and receiving data, and handling plug-and-play events. Therefore, as an NDIS_aware component, NDISUIO can directly open an NDIS miniport driver (i.e. network card driver) to send requests, set, and query information. NDISUIO provides an interface between a user-mode application and NDIS using DeviceIoControl (similar to the Unix ioctl). The NDISUIO driver (ndisuio.sys) is already installed in your system under:

C:\WINDOWS\system32\drivers

More information about NDISUIO can be obtained from MSDN.

3. How do I download WRAPI?

Click here to download the latest WRAPI 2.0 code, binaries and a sample application that invokes WRAPI.

4. What do I need to get WRAPI to work on my system?

To get WRAPI to work, you need to check if the NDISUIO service is started. This can be checked by typing the following command at the command prompt:

% net start ndisuio
The next thing to do is to disable the Wireless Zero Configuration service.

Disabling Wireless Zero COnfiguration
Wireless Zero Configuration is a Windows service that is normally started at boot time. It provides autoconfiguration for the 802.11 wireless adapters (NICs) by scanning for avaialble access points and associating with the strongest signal. This service automatically binds to NDISUIO and doesn't allow other apps/dlls like WRAPI to bind to it. If this service is not disabled, WRAPI applications report:
"Could not open NDIS Device, error 170".

In order to disable Wireless Zero Configuration, go to:
Control Panel ---> Performance and Maintenance ---> Administrative Tools ---> Services.

Click on Wireless Zero Configuration; change the "Startup Type" drop box to "Manual" and stop the service.

5. Do I need to write any code to get WRAPI to work?

Yes and No.

Yes, if you want to add your own functionality to WRAPI; and No, if you just want to use existing WRAPI functionality.

To program with WRAPI, you first need to download the WindowsXP DDK, which is available from your MSDN subscription.

Once you install the DDK, make sure you have the source code for Network Samples (this includes the code for the NDISUIO driver). Add the DDK include directory in your "includes" path.

To build WRAPI.dll from Sources:

Create a Visual Stuido 6.0 project with the source files and build it. Check that you have (done) the following:

To use WRAPI.dll in a test application:

WRAPITest.cpp is the source file for the test application. Add it to your Visual Studio 6.0 project and link the application against WRAPI.lib. Check that you have (done) the following:

The WRAPITest.cpp file shows the usage for the most common WRAPI functions like, WRAPIEnumerateDevices, WRAPIOpenNdisDevice, WRAPIGetAPList, WRAPIGetSSId, WRAPISetSSId, and WRAPIGetPacketStats

6. When I free memory that was allocated by WRAPI.dll for DeviceList and AP_List, in my WRAPI application, why do I get an Access Violation error?

In WRAPI.dll, the variables DeviceList and AP_List are allocated using malloc() and linked against MSVCRT.dll (Multithreaded C-runtime library) and not LIBC.lib. Therefore, the application using WRAPI should also link against the same library in order to avoid errors when freeing memory for these variables in the application's destructor.

7. Does WRAPI work with all vendor hardware?

WRAPI works on all wireless NICs (network interface cards) that have drivers for WindowsXP. In other words, WRAPI works with any driver that is NDIS 5.1 compliant. This is because the wireless OIDs are not supported in any earlier versions of NDIS (5.0 and earlier).

WRAPI has been tested on some of the most common wireless NICs including, Lucent ORiNOCO wireless cards, Cisco Aironet cards (340 and 4800 series), Compaq and Dell in-built wireless cards, and Linksys cards.