Skip to content

Latest commit

 

History

History
177 lines (138 loc) · 5.44 KB

nf-wlanapi-wlansetprofilelist.md

File metadata and controls

177 lines (138 loc) · 5.44 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wlanapi.WlanSetProfileList
WlanSetProfileList function (wlanapi.h)
Sets the preference order of profiles.
WlanSetProfileList
WlanSetProfileList function [NativeWIFI]
nwifi.wlansetprofilelist
wlanapi/WlanSetProfileList
nwifi\wlansetprofilelist.htm
nwifi
980c7920-a25e-4e05-a742-77178a7f000a
12/05/2018
WlanSetProfileList, WlanSetProfileList function [NativeWIFI], nwifi.wlansetprofilelist, wlanapi/WlanSetProfileList
wlanapi.h
Wlanapi.h
Windows
Windows Vista, Windows XP with SP3 [desktop apps only]
Windows Server 2008 [desktop apps only]
Wlanapi.lib
Wlanapi.dll
Windows
Wireless LAN API for Windows XP with SP2
19H1
WlanSetProfileList
wlanapi/WlanSetProfileList
c++
APIRef
kbSyntax
DllExport
wlanapi.dll
WlanSetProfileList

WlanSetProfileList function

-description

The WlanSetProfileList function sets the preference order of profiles for a given interface.

-parameters

-param hClientHandle [in]

The client's session handle, obtained by a previous call to the WlanOpenHandle function.

-param pInterfaceGuid [in]

The GUID of the interface.

-param dwItems [in]

The number of profiles in the strProfileNames parameter.

-param strProfileNames [in]

The names of the profiles in the desired order. Profile names are case-sensitive. This string must be NULL-terminated.

Windows XP with SP3 and Wireless LAN API for Windows XP with SP2:  The supplied names must match the profile names derived automatically from the SSID of the network. For infrastructure network profiles, the SSID must be supplied for the profile name. For ad hoc network profiles, the supplied name must be the SSID of the ad hoc network followed by -adhoc.

-param pReserved

Reserved for future use. Must be set to NULL.

-returns

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value may be one of the following return codes.

Return code Description
ERROR_ACCESS_DENIED
The caller does not have sufficient permissions to change the profile list.

Before WlanSetProfileList performs an operation that changes the relative order of all-user profiles in the profile list or moves an all-user profile to a lower position in the profile list, WlanSetProfileList retrieves the discretionary access control list (DACL) stored with the wlan_secure_all_user_profiles_order object. If the DACL does not contain an access control entry (ACE) that grants WLAN_WRITE_ACCESS permission to the access token of the calling thread, then WlanSetProfileList returns ERROR_ACCESS_DENIED.

ERROR_INVALID_HANDLE
The handle hClientHandle was not found in the handle table.
ERROR_INVALID_PARAMETER
One of the following conditions occurred:
  • hClientHandle is NULL or invalid.
  • pInterfaceGuid is NULL.
  • dwItems is 0.
  • strProfileNames is NULL.
  • The same profile name appears more than once in strProfileNames.
  • pReserved is not NULL.
ERROR_NOT_FOUND
strProfileNames contains the name of a profile that is not present in the profile store.
RPC_STATUS
Various error codes.

-remarks

The WlanSetProfileList function sets the preference order of wireless LAN profiles for a given wireless interface.

The profiles in the list must be a one-to-one match with the current profiles returned by the WlanGetProfileList function. The position of group policy profiles cannot be changed.

All wireless LAN functions require an interface GUID for the wireless interface when performing profile operations. When a wireless interface is removed, its state is cleared from Wireless LAN Service (WLANSVC) and no profile operations are possible.

The WlanSetProfileList function can fail with ERROR_INVALID_PARAMETER if the wireless interface specified in the pInterfaceGuid parameter has been removed from the system (a USB wireless adapter that has been removed, for example).

-see-also

WlanGetProfile

WlanGetProfileList

WlanSetProfile