zoukankan      html  css  js  c++  java
  • DSAPI Wifi热点的扫描与连接

    使用DSAPI扫描和连接Wifi热点,支持连接隐藏的SSID。

    效果演示:

    代码如下:

        Private Wifi As New DSAPI.网络.Wifi
    
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    
            '--------扫描Wifi热点
            Win7链接列表框1.链接项列表.Clear()
            Dim 所有热点() As DSAPI.网络.Wifi.Wifi热点 = Wifi.扫描可用Wifi热点
            For Each 热点 As DSAPI.网络.Wifi.Wifi热点 In 所有热点
                Win7链接列表框1.链接项列表.Add(New 链接项(热点.SSID名称))
            Next
    
    
            '--------连接wifi热点
            Dim 已连接网络 As Boolean = If(DSAPI.网络.当前已联网的网络连接 Is Nothing, False, True)
            If 已连接网络 Then Exit Sub
            For Each 热点 As DSAPI.网络.Wifi.Wifi热点 In 所有热点
                If 热点.SSID名称 = "dskj-bj" Then
                    Wifi.连接到Wifi热点(热点.SSID名称, "123123123")
                    Exit For
                End If
            Next
        End Sub
    

    Wifi热点属性:

    SSID名称
    加密类型
    无线信道
    信号质量
    有安全锁

    Wifi热点方法:


    连接到Wifi热点
    扫描可用Wifi热点

  • 相关阅读:
    linux getch()实现
    cppcheck 下载与安装(Liunx)
    apt-get 命令
    nanopb 文档
    VS调试技术
    c 单元测试 check
    GDB 调试
    GCC选项 –I,-l,-L
    作业66
    zhuoye
  • 原文地址:https://www.cnblogs.com/dylike/p/10783666.html
Copyright © 2011-2022 走看看