views:

70

answers:

2

I am trying to identify a method for obtaining nearby wifi access points using C in Windows. I am coding in Visual Studio 2010. I have read the necessary documentation but am lacking in guidance on how to implement code that would accomplish this.

I am specifically interested in obtaining the MAC address of nearby access points or at a minimum the MAC address of the currently connected Wifi access point. Is it possible to do this using WMI in Windows, specifically on Windows XP SP3 and later?

Any pointers on how to do this are greatly appreciated.

+2  A: 

If C/C++, look here in the Microsoft NativeWifi library. XP SP2 or higher.1

Serapth
A: 

The native wifi lib is good, the function WlanGetNetworkBssList will populate memory with a list of networks, including their MAC addresses. However, that is only supported on vista and above, on xp it will fail and fill the structure with garbage.

Im not sure of any way to get the macs on XP.

Xennith
I have experienced that exact problem, just junk in the return of that function. Need some way to get around it.
WizardsSleeve