|
Prev: Connecting H-P Deskjet 6840 Printer to computer running Vista
Next: Have Internet Connection, but Vista says Not
From: Victor.Morozko on 19 May 2008 07:13 Greetings... I'm trying automatically connect to my wireless network. I'm using such: std::auto_ptr<DOT11_SSID> dot11SSID(new DOT11_SSID); dot11SSID->uSSIDLength = ssid.size(); ::memcpy(dot11SSID->ucSSID, ssid.c_str(), ssid.size()); WLAN_CONNECTION_PARAMETERS connectionParameters; connectionParameters.wlanConnectionMode = wlan_connection_mode_auto; connectionParameters.strProfile = L""; connectionParameters.pDot11Ssid = dot11SSID.get(); connectionParameters.pDesiredBssidList = NULL; connectionParameters.dot11BssType = dot11_BSS_type_any; connectionParameters.dwFlags = WLAN_CONNECTION_HIDDEN_NETWORK; result = ::WlanConnect(clientHandle, &wlanInterfaceGuid, &connectionParameters, NULL); code. (ssid -- std::string) But result always == ERROR_INVALID_PARAMETER What I'm doing wrong? Best regards...
From: Pavel A. on 19 May 2008 15:26 Try to set connectionParameters.strProfile = NULL (not a empty string). --PA <Victor.Morozko(a)gmail.com> wrote in message news:59ae27e8-8ca1-4695-b27c-3b5c5b622bdf(a)d1g2000hsg.googlegroups.com... > Greetings... > > I'm trying automatically connect to my wireless network. > I'm using such: > > std::auto_ptr<DOT11_SSID> dot11SSID(new DOT11_SSID); > dot11SSID->uSSIDLength = ssid.size(); > ::memcpy(dot11SSID->ucSSID, ssid.c_str(), ssid.size()); > > WLAN_CONNECTION_PARAMETERS connectionParameters; > connectionParameters.wlanConnectionMode = wlan_connection_mode_auto; > connectionParameters.strProfile = L""; > connectionParameters.pDot11Ssid = dot11SSID.get(); > connectionParameters.pDesiredBssidList = NULL; > connectionParameters.dot11BssType = dot11_BSS_type_any; > connectionParameters.dwFlags = WLAN_CONNECTION_HIDDEN_NETWORK; > > result = ::WlanConnect(clientHandle, &wlanInterfaceGuid, > &connectionParameters, NULL); > > code. (ssid -- std::string) But result always == > ERROR_INVALID_PARAMETER > > What I'm doing wrong? > > Best regards...
From: Victor.Morozko on 21 May 2008 15:15 NULL changed nothing...
From: Pavel A. on 21 May 2008 16:56 <Victor.Morozko(a)gmail.com> wrote in message news:0427e122-ac49-4846-9f14-41d33d6c5f0f(a)t54g2000hsg.googlegroups.com... > NULL changed nothing... XP or Vista?
From: Victor.Morozko on 22 May 2008 03:58
> XP or Vista? Sorry. Vista 32 bit (home ultimate). |