Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The WLAN_HOSTED_NETWORK_REASON enumerated type specifies the possible values for the result of a wireless Hosted Network function call.
Syntax
typedef enum _WLAN_HOSTED_NETWORK_REASON {
wlan_hosted_network_reason_success = 0,
wlan_hosted_network_reason_unspecified,
wlan_hosted_network_reason_bad_parameters,
wlan_hosted_network_reason_service_shutting_down,
wlan_hosted_network_reason_insufficient_resources,
wlan_hosted_network_reason_elevation_required,
wlan_hosted_network_reason_read_only,
wlan_hosted_network_reason_persistence_failed,
wlan_hosted_network_reason_crypt_error,
wlan_hosted_network_reason_impersonation,
wlan_hosted_network_reason_stop_before_start,
wlan_hosted_network_reason_interface_available,
wlan_hosted_network_reason_interface_unavailable,
wlan_hosted_network_reason_miniport_stopped,
wlan_hosted_network_reason_miniport_started,
wlan_hosted_network_reason_incompatible_connection_started,
wlan_hosted_network_reason_incompatible_connection_stopped,
wlan_hosted_network_reason_user_action,
wlan_hosted_network_reason_client_abort,
wlan_hosted_network_reason_ap_start_failed,
wlan_hosted_network_reason_peer_arrived,
wlan_hosted_network_reason_peer_departed,
wlan_hosted_network_reason_peer_timeout,
wlan_hosted_network_reason_gp_denied,
wlan_hosted_network_reason_service_unavailable,
wlan_hosted_network_reason_device_change,
wlan_hosted_network_reason_properties_change,
wlan_hosted_network_reason_virtual_station_blocking_use,
wlan_hosted_network_reason_service_available_on_virtual_station
} WLAN_HOSTED_NETWORK_REASON, *PWLAN_HOSTED_NETWORK_REASON;
Constants
wlan_hosted_network_reason_successValue: 0 The operation was successful. |
wlan_hosted_network_reason_unspecifiedUnknown error. |
wlan_hosted_network_reason_bad_parametersBad parameters. For example, this reason code is returned if an application failed to reference the client context from the correct handle (the handle returned by the WlanOpenHandle function). |
wlan_hosted_network_reason_service_shutting_downService is shutting down. |
wlan_hosted_network_reason_insufficient_resourcesService is out of resources. |
wlan_hosted_network_reason_elevation_requiredThis operation requires elevation. |
wlan_hosted_network_reason_read_onlyAn attempt was made to write read-only data. |
wlan_hosted_network_reason_persistence_failedData persistence failed. |
wlan_hosted_network_reason_crypt_errorA cryptographic error occurred. |
wlan_hosted_network_reason_impersonationUser impersonation failed. |
wlan_hosted_network_reason_stop_before_startAn incorrect function call sequence was made. |
wlan_hosted_network_reason_interface_availableA wireless interface has become available. |
wlan_hosted_network_reason_interface_unavailableA wireless interface has become unavailable. This reason code is returned by the wireless Hosted Network functions any time the network state of the wireless Hosted Network is wlan_hosted_network_unavailable. For example if the wireless Hosted Network is disabled by group policy on a domain, then the network state of the wireless Hosted Network is wlan_hosted_network_unavailable. In this case, any calls to the WlanHostedNetworkStartUsing or WlanHostedNetworkForceStart function would return this reason code. |
wlan_hosted_network_reason_miniport_stoppedThe wireless miniport driver stopped the Hosted Network. |
wlan_hosted_network_reason_miniport_startedThe wireless miniport driver status changed. |
wlan_hosted_network_reason_incompatible_connection_startedAn incompatible connection started. An incompatible connection refers to one of the following cases:
Windows will stop the wireless Hosted Network on the software-based wireless access point (AP) adapter when an incompatible connection starts on the primary station adapter. The network state of the wireless Hosted Network state would become wlan_hosted_network_unavailable. |
wlan_hosted_network_reason_incompatible_connection_stoppedAn incompatible connection stopped. An incompatible connection previously started on the primary station adapter (wlan_hosted_network_reason_incompatible_connection_started), but the incompatible connection has stopped. If the wireless Hosted Network was previously stopped as a result of an incompatible connection being started, Windows will not automatically restart the wireless Hosted Network. Applications can restart the wireless Hosted Network on the AP adapter by calling the WlanHostedNetworkStartUsing or WlanHostedNetworkForceStart function. |
wlan_hosted_network_reason_user_actionA state change occurred that was caused by explicit user action. |
wlan_hosted_network_reason_client_abortA state change occurred that was caused by client abort. |
wlan_hosted_network_reason_ap_start_failedThe driver for the wireless Hosted Network failed to start. |
wlan_hosted_network_reason_peer_arrivedA peer connected to the wireless Hosted Network. |
wlan_hosted_network_reason_peer_departedA peer disconnected from the wireless Hosted Network. |
wlan_hosted_network_reason_peer_timeoutA peer timed out. |
wlan_hosted_network_reason_gp_deniedThe operation was denied by group policy. |
wlan_hosted_network_reason_service_unavailableThe Wireless LAN service is not running. |
wlan_hosted_network_reason_device_changeThe wireless adapter used by the wireless Hosted Network changed. |
wlan_hosted_network_reason_properties_changeThe properties of the wireless Hosted Network changed. |
wlan_hosted_network_reason_virtual_station_blocking_useA virtual station is active and blocking operation. |
wlan_hosted_network_reason_service_available_on_virtual_stationAn identical service is available on a virtual station. |
Remarks
The WLAN_HOSTED_NETWORK_REASON enumerated type is an extension to native wireless APIs added to support the wireless Hosted Network on Windows 7 and later.
The WLAN_HOSTED_NETWORK_REASON enumerates the possible reasons that a wireless Hosted Network function call failed or the reasons why a particular wireless Hosted Network notification was generated.
On Windows 7 and later, the operating system installs a virtual device if a Hosted Network capable wireless adapter is present on the machine. This virtual device normally shows up in the “Network Connections Folder” as ‘Wireless Network Connection 2’ with a Device Name of ‘Microsoft Virtual WiFi Miniport adapter’ if the computer has a single wireless network adapter. This virtual device is used exclusively for performing software access point (SoftAP) connections and is not present in the list returned by the WlanEnumInterfaces function. The lifetime of this virtual device is tied to the physical wireless adapter. If the physical wireless adapter is disabled, this virtual device will be removed as well.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 7 [desktop apps only] |
| Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
| Header | wlanapi.h (include Wlanapi.h) |
See also
WlanHostedNetworkQuerySecondaryKey
WlanHostedNetworkRefreshSecuritySettings