DOT11EXT_SET_DEFAULT_KEY_ID callback function (wlanihv.h)

Important  The Native 802.11 Wireless LAN interface is deprecated in Windows 10 and later. Please use the WLAN Device Driver Interface (WDI) instead. For more information about WDI, see WLAN Universal Windows driver model.
 
The IHV Extensions DLL calls the Dot11ExtSetDefaultKeyId function to set the table index of the default or per-station cipher key with which the wireless LAN (WLAN) adapter uses by default when encrypting transmitted packet data.

Syntax

DOT11EXT_SET_DEFAULT_KEY_ID Dot11extSetDefaultKeyId;

DWORD Dot11extSetDefaultKeyId(
  [in, optional] HANDLE hDot11SvcHandle,
  [in]           ULONG uDefaultKeyId
)
{...}

Parameters

[in, optional] hDot11SvcHandle

The handle used by the operating system to reference the WLAN adapter. This handle value was specified through a previous call to the Dot11ExtIhvInitAdapter IHV Handler function.

[in] uDefaultKeyId

The index value of the key within the adapter's default or per-station cipher key tables.

For standard 802.11 cipher algorithms, such as WEP or TKIP, uDefaultKeyId must be from 0 through 3. For a proprietary cipher algorithm developed by an IHV, uDefaultKeyId can be any value within the range defined by the IHV.

Return value

If the call succeeds, the function returns ERROR_SUCCESS. Otherwise, it returns an error code defined in Winerror.h.

Remarks

The default key identifier (ID) specifies the index of a cipher key in the adapter's default key and per-station default key tables that the adapter uses for data encryption. The adapter uses the cipher key referenced by the default key ID as the default encryption key for transmitted packets unless a key-mapping key exists for the destination media access control (MAC) address. For more information about these cipher key types, see 802.11 Cipher Key Types.

A call to the Dot11ExtSetDefaultKeyId function results in a set request of the OID_DOT11_CIPHER_DEFAULT_KEY_ID object identifier (OID) to the Native 802.11 miniport driver, which manages the WLAN adapter.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header wlanihv.h (include Wlanihv.h)

See also

OID_DOT11_CIPHER_DEFAULT_KEY_ID

Dot11ExtIhvInitAdapter

802.11 Cipher Key Types