query wifi rssi in visual c# on windows 7
Could anyone please point me to an API that works on windows 7 for reading wifi RSSI?
I've tried MSNDIS, OID'S, and Managed W开发者_JS百科ifi with no luck.
thanks
Although the API and their signature haven’t changed (AFAIK), there are differences between WiFi on Win7 and XP so you may want to be careful using XP examples.
A managed C# wrapper around WlanAPI that works on Win7 can be found here: http://managedwifi.codeplex.com/workitem/list/basic?size=2147483647.
Edit: Original answer was XP only I think, but the following might work (I don't have WiFi available right now to try it out).
The WLAN_BSS_ENTRY structure has a lRssi
property. The documentation for WlanGetAvailableNetworkList has some C++ sample code which would probably be useful to read through first and then you can look at the PInvoke page for WlanGetAvailableNetworkList for a short C# sample.
精彩评论