Click here to Skip to main content
16,022,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
//this is the code where i am getting error when i want to connect to adhoc connection so i have mention where i am getting error so help me out....
if(pAvailableNetworkList->Network[i].dot11BssType==2)
{
    cout<<"\nProcess to Connect to adhoc";
    WLAN_CONNECTION_PARAMETERS ConnPara;
    ConnPara.wlanConnectionMode = wlan_connection_mode_discovery_secure;
    ConnPara.strProfile = NULL;
    DOT11_SSID temp2;
    temp2.ucSSID = pAvailableNetworkList->Network[i].dot11Ssid.ucSSID;
    //in above line i am getting error like "l-value required"
    temp2.uSSIDLength = pAvailableNetworkList->Network[i].dot11Ssid.uSSIDLength;
    ConnPara.pDot11Ssid = &temp2;
    ConnPara.pDesiredBssidList = NULL; //change if not working
    ConnPara.dot11BssType = dot11_BSS_type_any;
    ConnPara.dwFlags = WLAN_CONNECTION_ADHOC_JOIN_ONLY;
    WlanConnect(hClientHandle,
	        &interfaceGuid,
         	&ConnPara,
		NULL
	);
}



Thanks in advance :) :) :)
Posted
Updated 20-Feb-10 4:28am
v2

1 solution

ucSSID is an array so cannot be an l-value in an expression. See MSDN Documentation[^] for further details.
 
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