通过WlanConnect连接返回87 [个人资料?] [英] Connecting by WlanConnect returns 87 [profile?]
本文介绍了通过WlanConnect连接返回87 [个人资料?]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我正在使用VS2008在XP机器上开发8.1平板电脑。
i'm developing with VS2008 on a XP machine for a 8.1 tablet.
如果我尝试通过WlanConnect连接wifi网络,我总是收到87(无效参数)。
If I try to connect a wifi network by the WlanConnect, i always receive 87 (INVALID PARAMETER).
这是代码:
DOT11_SSID dot11_ssid;
dot11_ssid.uSSIDLength = sizeof(DOT11_SSID);
strcpy( (char*)dot11_ssid.ucSSID, (char*)pConfig->Ssid.ucSSID);
WLAN_CONNECTION_PARAMETERS connParameters;
connParameters.pDot11Ssid = &dot11_ssid;
connParameters.wlanConnectionMode = wlan_connection_mode_profile;
connParameters.strProfile = szConfigName;
connParameters.pDesiredBssidList = NULL;
connParameters.dwFlags = 0;
connParameters.dot11BssType = dot11_BSS_type_infrastructure;
dwError = WlanConnect( m_hWlanSession, &m_InterfaceInfo.InterfaceGuid, &connParameters, NULL);
if (dwError != ERROR_SUCCESS)
{
qDebug("Error WlanConnect: %d", dwError);
return false;
}
所有参数都有一个有效值但我怀疑是关于profile参数..什么是profile参数
All the parameters have a valid value but my doubt is about profile parameter .. what is the profile parameter
我尝试使用NULL和网络名称,但返回代码是87。
I tried with both NULL and the name of the network but the return code is 87.
SteMMo
推荐答案
解决了!
dot11_ssid.uSSIDLength must be the length of the string and not the size of the structure
这篇关于通过WlanConnect连接返回87 [个人资料?]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文