Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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.
Posted
Updated 3-Mar-10 23:57pm
v3

1 solution

Can you edit your question (don't add answer please) and copy the code snipet you are using?

It is quite difficult to know if you are missing anything if you don't explain what you are actually doing.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900