问题描述
我正在使用wlanconnect()连接到ADHOC连接.此功能给我一个ERROR_SUCCESS消息,所以我认为我没有传递任何错误的参数,但是我无法连接到任何网络,所以请帮助我...
我该怎么办,还有什么我想念的吗?
在此先感谢..
================================================== ==================
cout<<"\ n连接到addhoc的过程";
WLAN_CONNECTION_PARAMETERS ConnPara;
ConnPara.wlanConnectionMode = wlan_connection_mode_discovery_unsecure;
ConnPara.strProfile = NULL;
DOT11_SSID temp2;
temp2.uSSIDLength =
pAvailableNetworkList->
网络[i] .dot11Ssid.uSSIDLength;
temp2.ucSSID [temp2.uSSIDLength] =
pAvailableNetworkList->
网络[i] .dot11Ssid.ucSSID [temp2.uSSIDLength];
ConnPara.pDot11Ssid =& temp2;
ConnPara.pDesiredBssidList = NULL;
ConnPara.dot11BssType = pAvailableNetworkList->
网络[i] .dot11BssType;
ConnPara.dwFlags = pAvailableNetworkList->
网络[i] .dwFlags;
DWORD temp = WlanConnect(
hClientHandle,
& interfaceGuid,
& ConnPara,
NULL
);
=============
此代码我用于连接不安全的自组织连接,代码中没有错误,甚至给出了error_success.但是在成功运行后,Windows的连接没有变化,所以请告诉我我哪里错了.
I am using wlanconnect() to connect to ADHOC connection. This function is giving me an ERROR_SUCCESS message so i think there is no any wrong parameter that i am passing but i am not able to connect to any network so please help me out...
what else should i do is there any thing that i am missing?
Thanks in advance ..
====================================================================
cout<<"\nProcess to Connect to adhoc";
WLAN_CONNECTION_PARAMETERS ConnPara;
ConnPara.wlanConnectionMode = wlan_connection_mode_discovery_unsecure;
ConnPara.strProfile = NULL;
DOT11_SSID temp2;
temp2.uSSIDLength =
pAvailableNetworkList->
Network[i].dot11Ssid.uSSIDLength;
temp2.ucSSID[temp2.uSSIDLength] =
pAvailableNetworkList->
Network[i].dot11Ssid.ucSSID[temp2.uSSIDLength];
ConnPara.pDot11Ssid = &temp2;
ConnPara.pDesiredBssidList =NULL;
ConnPara.dot11BssType = pAvailableNetworkList->
Network[i].dot11BssType;
ConnPara.dwFlags = pAvailableNetworkList->
Network[i].dwFlags;
DWORD temp =WlanConnect(
hClientHandle,
&interfaceGuid,
&ConnPara,
NULL
);
==============
this code i am using for connecting unsecured adhoc connection and there is no error in code, even it gives error_success.But after running successfully, windows has no change in their connection so please tell me where i am wrong.
推荐答案
这篇关于通过vc ++连接到任何网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!