WlanGetAvailableNetworkList (Compact 2013)

3/26/2014

This function retrieves the list of available networks on an interface.

Syntax

DWORD WINAPI WlanGetAvailableNetworkList(
  __in        HANDLE hClientHandle,
  __in        const GUID* pInterfaceGuid,
  __in        DWORD dwFlags,
  __reserved  PVOID pReserved,
  __out       PWLAN_AVAILABLE_NETWORK_LIST* ppAvailableNetworkList
);

Parameters

  • hClientHandle
    The client's session handle, obtained by a previous call to the WlanOpenHandle function.
  • pInterfaceGuid
    The GUID of the interface to be queried
  • dwFlags
    Controls the type of networks returned in the list.

    Value

    Meaning

    WLAN_AVAILABLE_NETWORK_INCLUDE_ALL_ADHOC_PROFILES

    0x00000001

    Include all ad hoc network profiles in the available network list, including profiles that are not visible

    WLAN_AVAILABLE_NETWORK_INCLUDE_ALL_MANUAL_HIDDEN_PROFILES

    0x00000002

    Include all hidden network profiles in the available network list, including profiles that are not visible

  • pReserved
    Reserved; set to NULL.

Return Values

Value

Description

ERROR_SUCCESS

The function succeeds.

ERROR_INVALID_PARAMETER

hClientHandle is NULL or invalid, pReserved is not NULL, pInterfaceGuid is NULL, ppAvailableNetworkList is NULL, or the dwFlags parameter value is not set to one of the specified values.

ERROR_INVALID_HANDLE

The handle hClientHandle was not found in the handle table.

ERROR_NDIS_DOT11_POWER_STATE_INVALID

The radio for the interface is turned off.

RPC_STATUS

Various error codes.

ERROR_NOT_ENOUGH_MEMORY

Could not allocate memory for the query results.

Remarks

This function allocates memory for the list of returned interfaces. The caller is responsible for freeing this memory by using the WlanFreeMemory function.

See Also

Reference

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