Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

C# Programming

WMI Wifi discovery


How do I discover the networks detected by my Wi-Fi adapter?
I tried to use WMI. It shows information of the connected network
only.
There are some other WiFi access points available. But I am not able
to retrieve them using WMI(using c# code). The code which I tried is
given below.

Please let me know if we can detect other access points, which is
available and not currently connected with my adapter.

                ManagementObjectSearcher searcher =
                    new ManagementObjectSearcher("root\\WMI",
                    "SELECT * FROM
MSNdis_80211_ServiceSetIdentifier");

                foreach (ManagementObject queryObj in searcher.Get())
                {

Console.WriteLine("-----------------------------------");

Console.WriteLine("MSNdis_80211_ServiceSetIdentifier instance");

Console.WriteLine("-----------------------------------");

                    if(queryObj["Ndis80211SsId"] == null)
                        Console.WriteLine("Ndis80211SsId: {0}",
queryObj["Ndis80211SsId"]);
                    else
                    {
                        Byte[] arrNdis80211SsId = (Byte[])
(queryObj["Ndis80211SsId"]);
                        foreach (Byte arrValue in arrNdis80211SsId)
                        {
                            Console.WriteLine("Ndis80211SsId: {0}",
arrValue);
                        }
                    }
                }

Thanks
Srinivasan

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc