18,356
社区成员
发帖
与我相关
我的任务
分享
wlanConnPara.wlanConnectionMode =wlan_connection_mode_profile;
wlanConnPara.strProfile = NULL;
DOT11_SSID Ssidud={0};
string strSsid;
strSsid = CStringA(strsss);
Ssidud.uSSIDLength = (ULONG)strSsid.size();
memcpy(&Ssidud.ucSSID, strSsid.c_str(), strSsid.size());
//此处用来获取SSID字符
wlanConnPara.pDot11Ssid = &Ssidud;
wlanConnPara.dot11BssType = dot11_BSS_type_independent;
wlanConnPara.pDesiredBssidList = NULL;
wlanConnPara.dwFlags = 0;
pIfInfo = (WLAN_INTERFACE_INFO *) &pIfList->InterfaceInfo[i];
dwResult=WlanConnect(hClient,&pIfInfo->InterfaceGuid,&wlanConnPara ,NULL);