WlanSetProfileEapXmlUserData (Compact 7)


This function sets the Extensible Authentication Protocol (EAP) user credentials as specified by an XML string. The user credentials apply to a profile on an adapter. Only the caller can use these credentials.


DWORD WINAPI WlanSetProfileEapXmlUserData(
  __in        HANDLE hClientHandle,
  __in        const GUID *pInterfaceGuid,
  __in        LPCWSTR strProfileName,
  __in        DWORD dwFlags,
  __in        LPCWSTR strEapXmlUserData,
  __reserved  PVOID pReserved


  • hClientHandle
    [in] Handle to the session on the client. To obtain a handle, call the WlanOpenHandle function.
  • pInterfaceGuid
    [in] GUID of the interface.
  • strProfileName
    [in] Name of the profile associated with the EAP user data. Profile names are case sensitive and the string must be NULL terminated.
  • dwFlags
    Reserved; set to 0 (zero).
  • strEapXmlUserData
    [in] Pointer to XML data that is used to set the user credentials. The XML data must be based on the EAPHost User Credentials schema. To view sample user credential XML data, see EAPHost User Properties.
  • pReserved
    Reserved; set to NULL.

Return Values

Value Description


The function succeeds.


You included Connection Manager in your OS.


One of the following conditions occurred:

  • hClientHandle is NULL or invalid.
  • pInterfaceGuid is NULL.
  • pReserved is not NULL.
  • strProfileName is NULL.
  • strEapXmlUserData is NULL.
  • This function was called on a profile that uses a method other than 802.1X for authentication.


The handle hClientHandle was not found in the handle table.


Can be any Remote Procedure Call (RPC) error code. The RPC call may be unsuccessful due to Wlan RPC server issues, such as when the RPC server is not started. Refer to RPC for more information.


If you include Connection Manager in your OS design:

This function can be called on a profile that uses 802.1X only for authentication.

Windows Embedded Compact also does not support the Credentials element in EapHostUserCredentials xml schema. Only CredentialsBlob is supported.

See Also


Native Wi-Fi Functions
Native Wi-Fi Reference