次の方法で共有


WLAN_CONNECTION_PARAMETERS (Compact 2013)

3/26/2014

This structure defines the parameters that are used when the code calls the WlanConnect function.

Syntax

typedef struct _WLAN_CONNECTION_PARAMETERS {
  WLAN_CONNECTION_MODE wlanConnectionMode;
  LPCWSTR strProfile;
  PDOT11_SSID pDot11Ssid;
  PDOT11_BSSID_LIST pDesiredBssidList;
  DOT11_BSS_TYPE dot11BssType;
  DWORD dwFlags;
} WLAN_CONNECTION_PARAMETERS,
  *PWLAN_CONNECTION_PARAMETERS;

Members

  • strProfile
    Designates the profile being used for the connection.

    • If wlanConnectionMode is set to wlan_connection_mode_profile, then strProfile designates the name of the profile used for the connection.
    • If wlanConnectionMode is set to wlan_connection_mode_temporary_profile, then strProfile designates the XML representation of the profile that is used for the connection.
    • If wlanConnectionMode is set to wlan_connection_mode_discovery_secure or wlan_connection_mode_discovery_unsecure or wlan_connection_mode_auto, then set strProfile to NULL.
  • pDot11Ssid
    Pointer to a DOT11_SSID structure that specifies the service set identifier (SSID) of the network to connect to. This parameter is optional. When set to NULL, all SSIDs in the profile will be tried. This parameter must not be NULL if WLAN_CONNECTION_MODE is set to wlan_connection_mode_discovery_secure or wlan_connection_mode_discovery_unsecure.
  • pDesiredBssidList
    Pointer to a DOT11_BSSID_LIST structure that contains the list of basic service set (BSS) identifiers that are wanted for the connection.
  • dot11BssType
    A DOT11_BSS_TYPE value that indicates the BSS type of the network. If a profile is provided, this BSS type must be the same as the one in the profile.
  • dwFlags
    The following table shows flags used to designate the connection parameters:

    Constant

    Value

    Description

    WLAN_CONNECTION_HIDDEN_NETWORK

    0x00000001

    Connect to the destination network even if the destination is a hidden network. A hidden network does not broadcast its SSID. Do not use this flag if the destination network is an ad hoc network.

    If the profile specified by strProfile is not NULL, this flag is ignored and the nonBroadcast Element determines whether to connect to a hidden network.

    WLAN_CONNECTION_ADHOC_JOIN_ONLY

    0x00000002

    Do not form an ad hoc network. Join an ad hoc network only if the network already exists. Do not use this flag if the destination network is an infrastructure network.

    WLAN_CONNECTION_IGNORE_PRIVACY_BIT

    0x00000004

    Ignore the privacy bit when connecting to the network, because it ignores whether packets are encrypted and the method of encryption used. Use this flag only when connecting to an infrastructure network that uses a temporary profile.

    WLAN_CONNECTION_EAPOL_PASSTHROUGH

    0x00000008

    Exempt extensible authentication protocol over local area network (EAPOL) traffic from encryption and decryption. Use this flag when an application must send EAPOL traffic over an infrastructure network that uses open authentication and WEP encryption. This flag must not be used to connect to networks that require 802.1X authentication. This flag is valid only when wlanConnectionMode is set to wlan_connection_mode_temporary_profile. Avoid using this flag whenever possible.

See Also

Reference

Native Wi-Fi Structures
WlanConnect
nonBroadcast Element
Native Wi-Fi Reference