WlanSetFilterList (Compact 2013)

3/26/2014

This function sets the permit-deny list.

Syntax

DWORD WINAPI WlanSetFilterList(
  __in        HANDLE hClientHandle,
  __in        WLAN_FILTER_LIST_TYPE wlanFilterListType,
  __in_opt    const PDOT11_NETWORK_LIST pNetworkList,
  __reserved  PVOID pReserved
);

Parameters

  • hClientHandle
    Client session handle, obtained by a previous call to the WlanOpenHandle function.
  • wlanFilterListType
    A WLAN_FILTER_LIST_TYPE value that designates the type of filter list. The value must be either wlan_filter_list_type_user_permit or wlan_filter_list_type_user_deny.
  • pNetworkList
    Pointer to a DOT11_NETWORK_LIST structure that contains the list of networks to allow or deny. The dwIndex member of the structure must have a value less than the value of the dwNumberOfItems member of the structure or an access violation can occur.
  • pReserved
    Reserved; set to NULL.

Return Values

Value

Description

ERROR_SUCCESS

The function succeeds.

ERROR_ACCESS_DENIED

The caller does not have sufficient permissions to set the filter list.

ERROR_INVALID_PARAMETER

hClientHandle is NULL or invalid or pReserved is not 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

Denied networks cannot be connected by automatic configuration and are not included on the visible networks list. New user permit-deny lists overwrite earlier versions of the user lists.

To clear a filter list, set the pNetworkList parameter to NULL, or pass a pointer to a DOT11_NETWORK_LIST structure that has the dwNumberOfItems member set to 0.

To add all SSIDs to a filter list, pass a pointer to a DOT11_NETWORK_LIST structure with an associated DOT11_NETWORK structure that has the uSSIDLength member of its DOT11_SSID structure set to 0.

To add all BSS types to a filter list, pass a pointer to a DOT11_NETWORK_LIST with an associated DOT11_NETWORK structure that has its dot11BssType member set to dot11_BSS_type_any.

See Also

Reference

Native Wi-Fi Functions
WlanOpenHandle
WLAN_FILTER_LIST_TYPE
DOT11_NETWORK_LIST
DOT11_NETWORK
DOT11_SSID
WlanGetFilterList
Native Wi-Fi Reference