WLAN_NOTIFICATION_DATA structure
Applies to: desktop apps only
The WLAN_NOTIFICATION_DATA structure contains information provided when receiving notifications.
Syntax
typedef struct _WLAN_NOTIFICATION_DATA {
DWORD NotificationSource;
DWORD NotificationCode;
GUID InterfaceGuid;
DWORD dwDataSize;
PVOID pData;
} WLAN_NOTIFICATION_DATA, *PWLAN_NOTIFICATION_DATA;
Members
- NotificationSource
-
A value that indicates where the notification comes from.
Windows XP with SP3 and Wireless LAN API for Windows XP with SP2: This parameter is set to WLAN_NOTIFICATION_SOURCE_NONE, WLAN_NOTIFICATION_SOURCE_ALL, or WLAN_NOTIFICATION_SOURCE_ACM.Value Meaning - WLAN_NOTIFICATION_SOURCE_NONE
A notification generated by an unknown source.
- WLAN_NOTIFICATION_SOURCE_ALL
A notification generated by the 802.1X module.
- WLAN_NOTIFICATION_SOURCE_ACM
A notification generated by the auto configuration module. For more information on these notifications, see the WLAN_NOTIFICATION_ACM enumeration reference.
- WLAN_NOTIFICATION_SOURCE_HNWK
A notification generated by the wireless Hosted Network. For more information on these notifications, see the WLAN_HOSTED_NETWORK_NOTIFICATION_CODE enumeration reference.
This notification source is available on Windows 7 and on Windows Server 2008 R2 with the Wireless LAN Service installed.
- WLAN_NOTIFICATION_SOURCE_IHV
A notification generated by independent hardware vendors (IHV).
- WLAN_NOTIFICATION_SOURCE_ONEX
A notification generated by the 802.1X module. For more information on these notifications, see the ONEX_NOTIFICATION_TYPE enumeration reference.
- WLAN_NOTIFICATION_SOURCE_MSM
A notification generated by the media specific module (MSM). For more information on these notifications, see the WLAN_NOTIFICATION_MSM enumeration reference.
- WLAN_NOTIFICATION_SOURCE_SECURITY
A notification generated by the security module.
No notifications are currently defined for WLAN_NOTIFICATION_SOURCE_SECURITY.
- NotificationCode
-
The type of notification. The value of this member indicates what type of associated data will be present in the value pointed to by the pData member.
This member can be a ONEX_NOTIFICATION_TYPE, WLAN_NOTIFICATION_ACM, WLAN_NOTIFICATION_MSM, or WLAN_HOSTED_NETWORK_NOTIFICATION_CODE enumeration value.
Windows XP with SP3 and Wireless LAN API for Windows XP with SP2: Only the wlan_notification_acm_connection_complete and wlan_notification_acm_disconnected notifications are available.NotificationCode value Data type pointed to by pData member OneXNotificationTypeResultUpdate ONEX_RESULT_UPDATE_DATA OneXNotificationTypeAuthRestarted ONEX_AUTH_RESTART_REASON wlan_hosted_network_peer_state_change WLAN_HOSTED_NETWORK_DATA_PEER_STATE_CHANGE wlan_hosted_network_radio_state_change WLAN_HOSTED_NETWORK_RADIO_STATE wlan_hosted_network_state_change WLAN_HOSTED_NETWORK_STATE_CHANGE wlan_notification_acm_autoconf_enabled None wlan_notification_acm_autoconf_disabled None wlan_notification_acm_background_scan_enabled None wlan_notification_acm_background_scan_disabled None wlan_notification_acm_bss_type_change DOT11_BSS_TYPE wlan_notification_acm_power_setting_change WLAN_POWER_SETTING wlan_notification_acm_scan_complete None wlan_notification_acm_scan_fail WLAN_REASON_CODE wlan_notification_acm_connection_start WLAN_CONNECTION_NOTIFICATION_DATA wlan_notification_acm_connection_complete WLAN_CONNECTION_NOTIFICATION_DATA wlan_notification_acm_connection_attempt_fail WLAN_CONNECTION_NOTIFICATION_DATA wlan_notification_acm_filter_list_change None wlan_notification_acm_interface_arrival None wlan_notification_acm_interface_removal None wlan_notification_acm_profile_change None wlan_notification_acm_profile_name_change Two WCHAR strings, the old profile name followed by the new profile name. wlan_notification_acm_profiles_exhausted None wlan_notification_acm_network_not_available None wlan_notification_acm_network_available None wlan_notification_acm_disconnecting WLAN_CONNECTION_NOTIFICATION_DATA wlan_notification_acm_disconnected WLAN_CONNECTION_NOTIFICATION_DATA wlan_notification_acm_adhoc_network_state_change WLAN_ADHOC_NETWORK_STATE wlan_notification_msm_associating WLAN_MSM_NOTIFICATION_DATA wlan_notification_msm_associated WLAN_MSM_NOTIFICATION_DATA wlan_notification_msm_authenticating WLAN_MSM_NOTIFICATION_DATA wlan_notification_msm_connected WLAN_MSM_NOTIFICATION_DATA wlan_notification_msm_roaming_start WLAN_MSM_NOTIFICATION_DATA wlan_notification_msm_roaming_end WLAN_MSM_NOTIFICATION_DATA wlan_notification_msm_radio_state_change WLAN_PHY_RADIO_STATE wlan_notification_msm_signal_quality_change WLAN_SIGNAL_QUALITY (ULONG) wlan_notification_msm_disassociating WLAN_MSM_NOTIFICATION_DATA wlan_notification_msm_disconnected WLAN_MSM_NOTIFICATION_DATA wlan_notification_msm_peer_join WLAN_MSM_NOTIFICATION_DATA wlan_notification_msm_peer_leave WLAN_MSM_NOTIFICATION_DATA wlan_notification_msm_adapter_removal WLAN_MSM_NOTIFICATION_DATA wlan_notification_msm_adapter_operation_mode_change ULONG - InterfaceGuid
-
The interface on which the notification is for.
- dwDataSize
-
The size, in bytes, of value pointed to by pData member.
- pData
-
A pointer to additional data provided for the notification. The type of data pointed to by the pData member is determined by the value of the NotificationCode member.
Remarks
The WlanRegisterNotification function is used by an application to register and unregister notifications on all wireless interfaces. When registering for notifications, an application must provide a callback function pointed to by the funcCallback parameter passed to the WlanRegisterNotification function. The prototype for this callback function is the WLAN_NOTIFICATION_CALLBACK. This callback function will receive notifications that have been registered in the dwNotifSource parameter passed to the WlanRegisterNotification function.
The callback function is called with a pointer to a WLAN_NOTIFICATION_DATA structure as the first parameter that contains detailed information on the notification. The callback function also receives a second parameter that contains a pointer to the client context passed in the pCallbackContext parameter to the WlanRegisterNotification function. This client context can be a NULL pointer if that is what was passed to the WlanRegisterNotification function.
Once registered, the callback function will be called whenever a notification is available until the client unregisters or closes the handle.
Any registration to receive notifications is automatically undone if the calling application closes its calling handle (by calling WlanCloseHandle with the hClientHandle parameter) used to register for notifications with the WlanRegisterNotification function or if the process ends.
An application can time out and query the current interface state instead of waiting for a notification.
If the NotificationSource member of the WLAN_NOTIFICATION_DATA structure received by the callback function is WLAN_NOTIFICATION_SOURCE_ACM, then the received notification is an auto configuration module notification. The NotificationCode member of the WLAN_NOTIFICATION_DATA structure passed to the WLAN_NOTIFICATION_CALLBACK function determines the interpretation of the pData member of WLAN_NOTIFICATION_DATA structure. For more information on these notifications, see the WLAN_NOTIFICATION_ACM enumeration reference.
The wlan_notification_acm_connection_attempt_fail notification is used only when an application tries and fails to initiate a connection using WlanConnect. This notification is sent for each failed SSID. The wlanReasonCode member of the WLAN_CONNECTION_NOTIFICATION_DATA structure included with the notification data specifies the reason the SSID failed.
If all SSIDs fail when a connection is initiated using WlanConnect, the notification wlan_notification_acm_connection_complete is sent with wlanReasonCode set to WLAN_REASON_CODE_NETWORK_NOT_AVAILABLE. If at least one SSID succeeds, then the notification is sent with wlanReasonCode set to WLAN_REASON_CODE_SUCCESS.
Unlike wlan_notification_acm_connection_attempt_fail, the wlan_notification_acm_connection_complete notification is sent for automatic connections and for connections initiated using WlanConnect. If the connection succeeds, wlanReasonCode set to WLAN_REASON_CODE_SUCCESS. Otherwise, wlanReasonCode specifies the reason for failure.
The wlan_notification_acm_filter_list_change notification is sent when there is a change in the filter list, either through group policy or a call to the WlanSetFilterList function. An application can call the WlanGetFilterList function to retrieve the new filter list.
The wlan_notification_acm_network_not_available notification is sent if the wireless service cannot find any connectable network after a scan. The interface on which no connectable network is found is identified by the InterfaceGuid member of the WLAN_NOTIFICATION_DATA structure.
The wlan_notification_acm_network_available notification is sent when all of the following conditions occur:
- The wireless service finds connectable networks after a scan
- The interface is in the disconnected state;
- There is no compatible auto-connect profile that the wireless service can use to connect.
The interface on which connectable networks are found is identified by the InterfaceGuid member of the WLAN_NOTIFICATION_DATA structure.
The wlan_notification_acm_profile_change notification is sent when there is a change in a profile or the profile list, either through group policy or by calls to Native Wifi functions. An application can call WlanGetProfileList and WlanGetProfile functions to retrieve the updated profiles. The interface on which the profile list changes is identified by the InterfaceGuid member of the WLAN_NOTIFICATION_DATA structure.
The wlan_notification_acm_profiles_exhausted notification is sent if the wireless service cannot connect to any network automatically after trying all auto-connect profiles. The notification won't be sent if there is no auto-connect profile or no connectable network. The interface is identified by identified by the InterfaceGuid member of the WLAN_NOTIFICATION_DATA structure.
If the NotificationSource member of the WLAN_NOTIFICATION_DATA structure received by the callback function is WLAN_NOTIFICATION_SOURCE_HNWK, then the received notification is a wireless Hosted Network notification supported on Windows 7 and on Windows Server 2008 R2 with the Wireless LAN Service installed. The NotificationCode member of the WLAN_NOTIFICATION_DATA structure passed to the WLAN_NOTIFICATION_CALLBACK function determines the interpretation of the pData member of WLAN_NOTIFICATION_DATA structure. For more information on these notifications, see the WLAN_HOSTED_NETWORK_NOTIFICATION_CODE enumeration reference.
If the NotificationSource member of the WLAN_NOTIFICATION_DATA structure received by the callback function is WLAN_NOTIFICATION_SOURCE_IHV, then the received notification is an indepent hardware vendor (IHV) notification. The NotificationCode member of the WLAN_NOTIFICATION_DATA structure passed to the WLAN_NOTIFICATION_CALLBACK function determines the interpretation of the pData member of WLAN_NOTIFICATION_DATA structure, which is specific to the IHV.
If the NotificationSource member of the WLAN_NOTIFICATION_DATA structure received by the callback function is WLAN_NOTIFICATION_SOURCE_MSM, then the received notification is a media specific module (MSM) notification. The NotificationCode member of the WLAN_NOTIFICATION_DATA structure passed to the WLAN_NOTIFICATION_CALLBACK function determines the interpretation of the pData member of WLAN_NOTIFICATION_DATA structure. For more information on these notifications, see the WLAN_NOTIFICATION_MSM enumeration reference.
The wlan_notification_msm_adapter_operation_mode_change notification is used when the operation mode changes. For more information about operation modes, see Native 802.11 Operation Modes. Two operation modes are supported: DOT11_OPERATION_MODE_EXTENSIBLE_STATION and DOT11_OPERATION_MODE_NETWORK_MONITOR. The operation mode constants are defined in the header file Windot11.h. When this notification is sent, pData points to the current operation mode.
The wlan_notification_msm_peer_join and wlan_notification_msm_peer_leave notifications are used only when a machine creates an ad hoc network. These notifications are not used when a machine joins an existing ad hoc network.
If the NotificationSource member of the WLAN_NOTIFICATION_DATA structure received by the callback function is WLAN_NOTIFICATION_SOURCE_ONEX, then the received notification is an 802.1X module notification. The NotificationCode member of the WLAN_NOTIFICATION_DATA structure passed to the WLAN_NOTIFICATION_CALLBACK function determines the interpretation of the pData member of WLAN_NOTIFICATION_DATA structure. For more information on these notifications, see the ONEX_NOTIFICATION_TYPE enumeration reference.
If the NotificationSource member of the WLAN_NOTIFICATION_DATA structure received by the callback function is WLAN_NOTIFICATION_SOURCE_SECURITY, then the received notification is a security notification. No notifications are currently defined for WLAN_NOTIFICATION_SOURCE_SECURITY.
Requirements
|
Minimum supported client | Windows Vista, Windows XP with SP3 |
|---|---|
|
Minimum supported server | Windows Server 2008 |
|
Redistributable | Wireless LAN API for Windows XP with SP2 |
|
Header |
|
See also
- DOT11_BSS_TYPE
- Native 802.11 Operation Modes
- ONEX_AUTH_RESTART_REASON
- ONEX_NOTIFICATION_TYPE
- ONEX_RESULT_UPDATE_DATA
- WLAN_ADHOC_NETWORK_STATE
- WLAN_CONNECTION_NOTIFICATION_DATA
- WLAN_HOSTED_NETWORK_NOTIFICATION_CODE
- WLAN_HOSTED_NETWORK_DATA_PEER_STATE_CHANGE
- WLAN_HOSTED_NETWORK_RADIO_STATE
- WLAN_HOSTED_NETWORK_STATE_CHANGE
- WLAN_NOTIFICATION_ACM
- WLAN_NOTIFICATION_CALLBACK
- WLAN_NOTIFICATION_MSM
- WLAN_PHY_RADIO_STATE
- WLAN_POWER_SETTING
- WLAN_REASON_CODE
- WlanConnect
- WlanGetFilterList
- WlanGetProfile
- WlanGetProfileList
- WlanRegisterNotification
- WlanSetFilterList
Send comments about this topic to Microsoft
Build date: 2/3/2012