Freigeben über


WlanScan (Compact 2013)

3/26/2014

This function requests a scan for available networks on the indicated interface.

Syntax

DWORD WINAPI WlanScan(
  __in        HANDLE hClientHandle,
  __in        const GUID* pInterfaceGuid,
  __in_opt    const PDOT11_SSID pDot11Ssid,
  __in_opt    const PWLAN_RAW_DATA pIeData,
  __reserved  PVOID pReserved
);

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 to be scanned. This parameter is optional. When set to NULL, the returned list contains all available networks.
  • pIeData
    Pointer to a WLAN_RAW_DATA structure that can include client provisioning availability information and 802.1X authentication requirements
  • pReserved
    Reserved; set to NULL.

Return Values

Value

Description

ERROR_SUCCESS

The function succeeds

ERROR_INVALID_PARAMETER

hClientHandle is NULL or invalid, pInterfaceGuid is NULL, or pReserved is not NULL

ERROR_INVALID_HANDLE

The handle hClientHandle was not found in the handle table

RPC_STATUS

Various error codes

ERROR_NOT_ENOUGH_MEMORY

Could not allocate memory for the query results

Remarks

The WlanScan function returns immediately. To be notified when the network scan is complete, a client must register for notifications by calling WlanRegisterNotification.

Because wireless interfaces cannot send data packets while a scan is occurring, the WlanScan function might increase latency until the network scan is complete.

See Also

Reference

Native Wi-Fi Functions
WlanOpenHandle
DOT11_SSID
WLAN_RAW_DATA
WlanRegisterNotification
Native Wi-Fi Reference