The WlanSetProfileCustomUserData function sets the custom user data associated with a profile.
DWORD WlanSetProfileCustomUserData( HANDLE hClientHandle, const GUID *pInterfaceGuid, LPCWSTR strProfileName, DWORD dwDataSize, const PBYTE pData, PVOID pReserved );
The client's session handle, obtained by a previous call to the WlanOpenHandle function.
The GUID of the interface.
The name of the profile associated with the custom user data. Profile names are case-sensitive. This string must be NULL-terminated.
The size of pData, in bytes.
A pointer to the user data to be set.
Reserved for future use. Must be set to NULL.
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.
One of the following conditions occurred:
||The handle hClientHandle was not found in the handle table.|
||This function was called from an unsupported platform. This value will be returned if this function was called from a Windows XP with SP3 or Wireless LAN API for Windows XP with SP2 client.|
||Various error codes.|
For every wireless WLAN profile used by the Native Wifi AutoConfig service, Windows maintains the concept of custom user data. This custom user data is initially non-existent, but can be set by calling the WlanSetProfileCustomUserData function. The custom user data gets reset to empty any time the profile is modified by calling the WlanSetProfile function.
Once custom user data has been set, this data can be accessed using the WlanGetProfileCustomUserData function.
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 WlanSetProfileCustomUserData 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).
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|
|Header||wlanapi.h (include Wlanapi.h)|