次の方法で共有


Dot11ExtSetDefaultKey (Compact 2013)

3/26/2014

The IHV Extensions DLL calls this function to add or delete a cipher key from the default key or per-station default key tables of the wireless LAN (WLAN) adapter.

Syntax

DWORD WINAPI Dot11ExtSetDefaultKey(
    HANDLE hDot11SvcHandle,
    PDOT11_CIPHER_DEFAULT_KEY_VALUE pKey,
    DOT11_DIRECTION dot11Direction
);

Parameters

  • hDot11SvcHandle
    [in] The handle that is 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.
  • dot11Direction
    [in] A DOT11_DIRECTION value that specifies whether the key can be used only for received packets (DOT11_DIR_INBOUND) or both received and sent packets (DOT11_DIR_BOTH).

    Note

    The IHV Extensions DLL must not pass a value of DOT11_DIR_OUTBOUND to this parameter.

Return Value

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

Remarks

A call to the Dot11ExtSetDefaultKey function results in a set request of the OID_DOT11_CIPHER_DEFAULT_KEY object identifier to the WLAN adapter.

A default cipher key is defined by setting the MacAddr member of the DOT11_CIPHER_DEFAULT_KEY_VALUE structure to a value of 0x000000000000. A per-station default cipher key is defined by setting the MacAddr member to a valid unicast media access control (MAC) address.

A cipher key is deleted from the adapter’s key tables if the bDelete member of the DOT11_CIPHER_DEFAULT_KEY_VALUE structure is set to TRUE.

Requirements

Header

wlanihv.h

See Also

Reference

Native 802.11 IHV Extensibility Functions
Dot11ExtIhvInitAdapter
DOT11_CIPHER_DEFAULT_KEY_VALUE
DOT11_DIRECTION
OID_DOT11_CIPHER_DEFAULT_KEY
Native 802.11 IHV Extensions DLL