Native Wifi api

该api的可以实现windows的无线客户端的网络参数配置(WlanSetProfile),连接指定的ap,断开连接和获得其他关于无线网络的信息(ssid,rssi等)。

WLAN_NOTIFICATION_CALLBACK
WlanAllocateMemory
WlanCloseHandle
WlanConnect
WlanDeleteProfile
WlanDisconnect
WlanEnumInterfaces
WlanExtractPsdIEDataList
WlanFreeMemory
WlanGetAvailableNetworkList
WlanGetFilterList
WlanGetInterfaceCapability
WlanGetNetworkBssList
WlanGetProfile
WlanGetProfileCustomUserData
WlanGetProfileList
WlanGetSecuritySettings
WlanIhvControl
WlanOpenHandle
WlanQueryAutoConfigParameter
WlanQueryInterface
WlanReasonCodeToString
WlanRegisterNotification
WlanSaveTemporaryProfile
WlanScan
WlanSetAutoConfigParameter
WlanSetFilterList
WlanSetInterface
WlanSetProfile
WlanSetProfileCustomUserData
WlanSetProfileEapUserData
WlanSetProfileEapXmlUserData
WlanSetProfileList
WlanSetProfilePosition
WlanSetPsdIeDataList
WlanSetSecuritySettings
WlanUIEditProfile

 


//断开连接
    DWORD ver;
    HANDLE handle
=NULL;
    DWORD rs
= WlanOpenHandle(1,NULL,&ver,&handle);
    DWORD retWlanEnumInterfaces 
= WlanEnumInterfaces( handle, NULL, &ppInterfaceList );
    rs
= WlanDisconnect(
    handle,
        
&ppInterfaceList->InterfaceInfo[ 0 ].InterfaceGuid,
        NULL
        );
    WlanCloseHandle(handle,NULL);
posted @ 2008-09-11 10:38  ahuo  阅读(4524)  评论(1编辑  收藏  举报