views:

667

answers:

1

I am very new to Win7 and WMI. Please advice me where to see for active access point from WiFi and how to get ssid/rssi for each access point.

I have use:

ManagementClass mc = new ManagementClass("root\\WMI", "MSNdis_80211_ServiceSetIdentifier", null);          
ManagementObjectSearcher searcher1 = new ManagementObjectSearcher(@"root\wmi","SELECT * FROM MSNdis_80211_BSSIList");

but I got 0 results. Is this class support Win7? Anybody can help?

A: 

Instead of WMI you can use the Managed Wifi API.

Check this question Get SSID of the wireless network I am connected to with C# .Net on Windows Vista

Some time a go i wrote an example using delphi-prism, is very similar to C#. http://theroadtodelphi.wordpress.com/2009/09/30/detecting-wifi-networks-using-delphi-prism/

RRUZ
Thanx RRUZ,Actually i already use managed wifi api but wlan function seem cannot be applied and return "The type or namespace name 'Wlan' could not be found (are you missing a using directive or an assembly reference?)".I'm using Visual Studio 2010 and Windows 7. Is there any features in Visual Studio 2010 can help to get SSID and RSSI from Windows 7.
ailhaddin