WlanGetNetworkBssList (Compact 2013)
3/26/2014
This function retrieves the basic service sets (BSS) list of the network or networks on a given interface.
Syntax
DWORD WINAPI WlanGetNetworkBssList(
__in HANDLE hClientHandle,
__in const GUID* pInterfaceGuid,
__opt const PDOT11_SSID pDot11Ssid,
__in DOT11_BSS_TYPE dot11BssType,
__in BOOL bSecurityEnabled,
__reserved PVOID pReserved,
__out PWLAN_BSS_LIST* ppWlanBssList
);
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
- pDot11Ssid
Pointer to a DOT11_SSID structure that specifies the SSID of the network from which the BSS list is requested. This parameter is optional. When set to NULL, the returned list contains all available BSSs.
- dot11BssType
A DOT11_BSS_TYPE value that indicates the BSS type of the network. This parameter is valid only when pDot11Ssid is not set to NULL.
- bSecurityEnabled
Indicates whether security is enabled on the network. This parameter is only valid when pDot11Ssid is not set to NULL.
- pReserved
Reserved. Set to NULL.
- ppWlanBssList
A WLAN_BSS_LIST structure that contains a list of BSS entries
Return Values
Value |
Description |
---|---|
ERROR_SUCCESS |
The function succeeds |
ERROR_INVALID_PARAMETER |
hClientHandle is NULL or invalid, pReserved is not NULL, pInterfaceGuid is NULL, or ppWlanBssList is NULL. |
ERROR_INVALID_HANDLE |
The handle hClientHandle was not found in the handle table |
ERROR_NDIS_DOT11_POWER_STATE_INVALID |
The radio associated with the interface is turned off |
ERROR_NOT_SUPPORTED |
This function was called from an unsupported platform |
RPC_STATUS |
Various error codes |
ERROR_NOT_ENOUGH_MEMORY |
Could not allocate memory for the query results |
Remarks
This function will allocate memory for the list of returned networks. The caller is responsible for freeing this memory by using the WlanFreeMemory function.
See Also
Reference
Native Wi-Fi Functions
WlanOpenHandle
DOT11_SSID
DOT11_BSS_TYPE
WLAN_BSS_LIST
WlanFreeMemory
Native Wi-Fi Reference