Share via


WlanGetProfileCustomUserData (Compact 7)

3/12/2014

This function retrieves the custom user data associated with a profile.

Syntax

DWORD WINAPI WlanGetProfileCustomUserData(
  __in        HANDLE hClientHandle,
  __in        CONST GUID *pInterfaceGuid,
  __in        LPCWSTR strProfileName,
  __reserved  PVOID pReserved,
  __out       DWORD *pdwDataSize,
  __deref_out_bcount(*pdwDataSize)  PBYTE *ppData
);

Parameters

  • 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. Profile names are case-sensitive and the string must be NULL-terminated. The maximum length of the profile name is 255 characters. Therefore, the maximum string length, including the NULL terminator, is 256 characters.
  • pReserved
    Reserved; set to NULL.
  • pdwDataSize
    [out] Size of ppData, in bytes.
  • ppData
    [out] Pointer to the user data.

Return Values

Value Description

ERROR_SUCCESS

The function succeeds.

ERROR_ACCESS_DENIED

You included Connection Manager in your OS.

ERROR_INVALID_PARAMETER

One of the following occurred:

  • hClientHandle is NULL or invalid
  • pInterfaceGuid is NULL
  • strProfileName is NULL
  • pReserved is not NULL
  • pdwDataSize is 0 (zero)
  • ppData is NULL

ERROR_INVALID_HANDLE

The handle hClientHandle was not found in the handle table.

ERROR_NOT_SUPPORTED

This function was called from an unsupported platform.

RPC_STATUS

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.

Remarks

If you include Connection Manager in your OS design:

To free the memory allocated to ppData, you must call the WlanFreeMemory function.

See Also

Reference

Native Wi-Fi Functions
WlanOpenHandle
WlanFreeMemory
WlanSetProfileCustomUserData
Native Wi-Fi Reference