C#编@程@使@用@Ma@n@a@g@ed@ W@i@f@i A@PI连@接@无@线@S@S@I@D
2016-09-22 21:50
246 查看
如何用C#去操作无线网卡连接无线网络一直是个人学习过程中的一大困惑。好在最近成功解决了这个问题。最近在写一个中国电信ChinaNet无线热点自动连接工具,期间用到了Managed Wifi API,使用起来很是方便。
操作步骤很简单:
1.下载Managed Wifi API
关于Managed Wifi API:This project is a .NET class library allowing you to control Wifi (802.11) network adapters installed in your Windows machine programmatically.
The library uses the Native Wifi API, available since Windows Vista and Windows XP SP2 (in a limited fashion, and only after applying a hotfix provided in KB article 918997). Older versions of Windows are not supported.
2.创建C#工程文件,并添加对ManagedWifi.dll的引用。
3.编写代码,引用“Native Wifi API”。
关键代码如下:
?
4.示例程序允许枚举当前网卡接收到的所有无线SSID,并支持接入开放认证(无密码)的无线热点。
5.其它
Wifi XML配置文件请参考微软文档
http://www.microsoft.com/networking/WLAN/profile/v1
操作步骤很简单:
1.下载Managed Wifi API
关于Managed Wifi API:This project is a .NET class library allowing you to control Wifi (802.11) network adapters installed in your Windows machine programmatically.
The library uses the Native Wifi API, available since Windows Vista and Windows XP SP2 (in a limited fashion, and only after applying a hotfix provided in KB article 918997). Older versions of Windows are not supported.
2.创建C#工程文件,并添加对ManagedWifi.dll的引用。
3.编写代码,引用“Native Wifi API”。
关键代码如下:
?
5.其它
Wifi XML配置文件请参考微软文档
http://www.microsoft.com/networking/WLAN/profile/v1
相关文章推荐
- WPF教程(六) XAML基础
- C#索引器
- C# @以@M@D@F@文@件@链@接@数@据@库
- c# 安全队列
- C# 二分法查找和排序
- WPF教程(五) XAML是什么?
- 【C#】无损转换Image为Icon
- C#编程基础(一)
- 关于C#子窗体的Show方法和ShowDialog方法的一些体会
- 多阈值处理利用双Otsu阈值-C#实现-基于EmguCv
- 文字打字机效果
- C# $字符串
- C#面向对象_封装_160922
- C#操作注册表
- C#中Split用法(可以用在取小数点之前后之后)
- winform TabControl 添加关闭按钮 Add close button to TabControl TabPages - C#
- 追着嘟嘟学c#系列基础第十二篇-----c#递归【蓝鸥出品】
- C#程序如何获得系统权限
- Kinect Fusion Basics-WPF C# Sample代码解析
- C#之WinForm基础 画扇形时,出现的从X轴到扇形的第一条边沿顺时针方向的角怎么理解