C # implementing WiFi connector

Source: Internet
Author: User

Objective

Normally, Windows comes with a WiFi connection, but in order to give the user a better experience, or sometimes need to detect the WiFi status, it needs to be integrated into the project's state.

Principle

1, Microsoft comes with native Wifi API, but in C + +.

2, already has the great God in C # encapsulates the native Wifi API, so C # development based on the package, address: http://managedwifi.codeplex.com/

3, before the connection needs to configure the WLAN profile, if the connection fails, you want to delete the configuration.

4. You can also use the cmd command

To delete a configuration file
At the command prompt, type:
Netsh wlan delete profile name= "ProfileName"
Show all wireless profiles on your PC
At the command prompt, type:
Netsh wlan show profiles
Show security key
At the command prompt, type:
Netsh wlan show profile name= "ProfileName" key=clear
Stop automatically connecting to out-of-range networks
At the command prompt, type:
Netsh wlan set profileparameter name= "ProfileName" connectionmode=manual (auto-fill Auto)

Realize

1. WiFi List tooltip display details

2. Sort by signal strength

3. Connection Status Display

Specific code used in the project comments are very clear

Link: Http://pan.baidu.com/s/1eQlhH9S Password: 2alj

Reference:

Wlan_profile Schema Elements https://msdn.microsoft.com/zh-cn/library/ms706965

Native Wifi https://msdn.microsoft.com/en-us/library/ms706556 (v=vs.85). aspx

Wireless Profile Samples https://msdn.microsoft.com/zh-cn/library/aa369853

Managing Wireless network Profiles Http://windows.microsoft.com/zh-cn/windows-8/manage-wireless-network-profiles

C # implementing WiFi connector

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.