using System; using System
Collections
Generic; using System
Linq; using System
Text; using System
Runtime
InteropServices; namespace wifi { class Program { static void Main(string[] args) { wifi wf = new wifi(); wf
EnumerateAvailableNetwork(); } } class wifi { /// /// 打开一个wifi句柄 /// /// 版本号 /// 保留 /// 支持的最高版本(输出) /// 句柄(要得到的)以后的句柄一般都是这个 /// [DllImport("Wlanapi", EntryPoint = "WlanOpenHandle")] public static extern uint WlanOpenHandle(uint dwClientVersion, IntPtr pReserved, [Out] out uint pdwNegotiatedVersion, ref IntPtr ClientHandle); /// /// 关闭打开的句柄 /// /// 句柄 /// 保留 /// [DllImport("Wlanapi", EntryPoint = "WlanCloseHandle")] public static extern uint WlanCloseHandle([In] IntPtr hClientHandle, IntPtr pReserved); /// /// 列举无线网络适配器 /// /// 句柄 /// 保留 /// 数据指针(非托管) /// [DllImport("Wlanapi", E