WLAN_NOTIFICATION_DATA structure

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 the source of the notification.

    The possible values for this member are defined in the Wlanapai.h header file to values defined in the L2cmn.h header file.

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.

<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><span id="WLAN_NOTIFICATION_SOURCE_NONE"></span><span id="wlan_notification_source_none"></span>
<strong>WLAN_NOTIFICATION_SOURCE_NONE</strong>
0</td>
<td><p>A notification generated by an unknown source.</p></td>
</tr>
<tr class="even">
<td><span id="WLAN_NOTIFICATION_SOURCE_ONEX"></span><span id="wlan_notification_source_onex"></span>
<strong>WLAN_NOTIFICATION_SOURCE_ONEX</strong>
0X00000004</td>
<td><p>A notification generated by the 802.1X module. For more information on these notifications, see the <a href="https://msdn.microsoft.com/en-us/library/dd815250(v=vs.85)"><strong>ONEX_NOTIFICATION_TYPE</strong></a> enumeration reference.</p></td>
</tr>
<tr class="odd">
<td><span id="WLAN_NOTIFICATION_SOURCE_ACM"></span><span id="wlan_notification_source_acm"></span>
<strong>WLAN_NOTIFICATION_SOURCE_ACM</strong>
0X00000008</td>
<td><p>A notification generated by the auto configuration module. For more information on these notifications, see the <a href="https://msdn.microsoft.com/en-us/library/dd815254(v=vs.85)"><strong>WLAN_NOTIFICATION_ACM</strong></a> enumeration reference.</p></td>
</tr>
<tr class="even">
<td><span id="WLAN_NOTIFICATION_SOURCE_MSM"></span><span id="wlan_notification_source_msm"></span>
<strong>WLAN_NOTIFICATION_SOURCE_MSM</strong>
0X00000010</td>
<td><p>A notification generated by the media specific module (MSM). For more information on these notifications, see the <a href="https://msdn.microsoft.com/en-us/library/dd815255(v=vs.85)"><strong>WLAN_NOTIFICATION_MSM</strong></a> enumeration reference.</p></td>
</tr>
<tr class="odd">
<td><span id="WLAN_NOTIFICATION_SOURCE_SECURITY"></span><span id="wlan_notification_source_security"></span>
<strong>WLAN_NOTIFICATION_SOURCE_SECURITY</strong>
0X00000020</td>
<td><p>A notification generated by the security module.</p>
<p>No notifications are currently defined for <strong>WLAN_NOTIFICATION_SOURCE_SECURITY</strong>.</p></td>
</tr>
<tr class="even">
<td><span id="WLAN_NOTIFICATION_SOURCE_IHV"></span><span id="wlan_notification_source_ihv"></span>
<strong>WLAN_NOTIFICATION_SOURCE_IHV</strong>
0X00000040</td>
<td><p>A notification generated by independent hardware vendors (IHV).</p></td>
</tr>
<tr class="odd">
<td><span id="WLAN_NOTIFICATION_SOURCE_HNWK"></span><span id="wlan_notification_source_hnwk"></span>
<strong>WLAN_NOTIFICATION_SOURCE_HNWK</strong>
0X00000080</td>
<td><p>A notification generated by the wireless Hosted Network. For more information on these notifications, see the <a href="https://msdn.microsoft.com/en-us/library/dd439501(v=vs.85)"><strong>WLAN_HOSTED_NETWORK_NOTIFICATION_CODE</strong></a> enumeration reference.</p>
<p>This notification source is available on Windows 7 and on Windows Server 2008 R2 with the Wireless LAN Service installed.</p></td>
</tr>
<tr class="even">
<td><span id="WLAN_NOTIFICATION_SOURCE_ALL"></span><span id="wlan_notification_source_all"></span>
<strong>WLAN_NOTIFICATION_SOURCE_ALL</strong>
0X0000FFFF</td>
<td><p>A notification generated by the 802.1X module.</p></td>
</tr>
</tbody>
</table>

 

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.

The following values are possible when the **NotificationSource** member is equal to **WLAN\_NOTIFICATION\_SOURCE\_ONEX**.

<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><span id="OneXNotificationTypeResultUpdate"></span><span id="onexnotificationtyperesultupdate"></span><span id="ONEXNOTIFICATIONTYPERESULTUPDATE"></span>
<strong>OneXNotificationTypeResultUpdate</strong>
1</td>
<td><p>A status change occurred for 802.1X authentication. The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/dd815251(v=vs.85)"><strong>ONEX_RESULT_UPDATE_DATA</strong></a> structure that identifies the 802.1X status change.</p></td>
</tr>
<tr class="even">
<td><span id="OneXNotificationTypeAuthRestarted"></span><span id="onexnotificationtypeauthrestarted"></span><span id="ONEXNOTIFICATIONTYPEAUTHRESTARTED"></span>
<strong>OneXNotificationTypeAuthRestarted</strong>
2</td>
<td><p>The 802.1X authentication process was restarted. The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/dd815248(v=vs.85)"><strong>ONEX_AUTH_RESTART_REASON</strong></a> enumeration value that identifies the reason that 802.1X authentication was restarted.</p></td>
</tr>
<tr class="odd">
<td><span id="OneXNotificationTypeEventInvalid"></span><span id="onexnotificationtypeeventinvalid"></span><span id="ONEXNOTIFICATIONTYPEEVENTINVALID"></span>
<strong>OneXNotificationTypeEventInvalid</strong>
3</td>
<td></td>
</tr>
</tbody>
</table>

 

The following values are possible when the **NotificationSource** member is equal to **WLAN\_NOTIFICATION\_SOURCE\_ACM**.

<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><span id="wlan_notification_acm_autoconf_enabled"></span><span id="WLAN_NOTIFICATION_ACM_AUTOCONF_ENABLED"></span>
<strong>wlan_notification_acm_autoconf_enabled</strong>
0X00000001</td>
<td><p>Autoconfiguration is enabled.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_autoconf_disabled"></span><span id="WLAN_NOTIFICATION_ACM_AUTOCONF_DISABLED"></span>
<strong>wlan_notification_acm_autoconf_disabled</strong>
0X00000002</td>
<td><p>Autoconfiguration is disabled.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_acm_background_scan_enabled"></span><span id="WLAN_NOTIFICATION_ACM_BACKGROUND_SCAN_ENABLED"></span>
<strong>wlan_notification_acm_background_scan_enabled</strong>
0X00000003</td>
<td><p>Background scans are enabled.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_background_scan_disabled"></span><span id="WLAN_NOTIFICATION_ACM_BACKGROUND_SCAN_DISABLED"></span>
<strong>wlan_notification_acm_background_scan_disabled</strong>
0X00000004</td>
<td><p>Background scans are disabled.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_acm_bss_type_change"></span><span id="WLAN_NOTIFICATION_ACM_BSS_TYPE_CHANGE"></span>
<strong>wlan_notification_acm_bss_type_change</strong>
0X00000005</td>
<td><p>The BSS type for an interface has changed.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706001(v=vs.85)"><strong>DOT11_BSS_TYPE</strong></a> enumeration value that identifies the new basic service set (BSS) type.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_power_setting_change"></span><span id="WLAN_NOTIFICATION_ACM_POWER_SETTING_CHANGE"></span>
<strong>wlan_notification_acm_power_setting_change</strong>
0X00000006</td>
<td><p>The power setting for an interface has changed.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706923(v=vs.85)"><strong>WLAN_POWER_SETTING</strong></a> enumeration value that identifies the new power setting of an interface.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_acm_scan_complete"></span><span id="WLAN_NOTIFICATION_ACM_SCAN_COMPLETE"></span>
<strong>wlan_notification_acm_scan_complete</strong>
0X00000007</td>
<td><p>A scan for networks has completed.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_scan_fail"></span><span id="WLAN_NOTIFICATION_ACM_SCAN_FAIL"></span>
<strong>wlan_notification_acm_scan_fail</strong>
0X00000008</td>
<td><p>A scan for connectable networks failed.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms707394(v=vs.85)"><strong>WLAN_REASON_CODE</strong></a> data type value that identifies the reason the WLAN operation failed.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_acm_connection_start"></span><span id="WLAN_NOTIFICATION_ACM_CONNECTION_START"></span>
<strong>wlan_notification_acm_connection_start</strong>
0X00000009</td>
<td><p>A connection has started to a network in range.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706848(v=vs.85)"><strong>WLAN_CONNECTION_NOTIFICATION_DATA</strong></a> structure that identifies the network information for the connection attempt.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_connection_complete"></span><span id="WLAN_NOTIFICATION_ACM_CONNECTION_COMPLETE"></span>
<strong>wlan_notification_acm_connection_complete</strong>
0X0000000a</td>
<td><p>A connection has completed.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706848(v=vs.85)"><strong>WLAN_CONNECTION_NOTIFICATION_DATA</strong></a> structure that identifies the network information for the connection attempt that completed. The connection succeeded if the <strong>wlanReasonCode</strong> in <strong>WLAN_CONNECTION_NOTIFICATION_DATA</strong> is <strong>WLAN_REASON_CODE_SUCCESS</strong>. Otherwise, the connection has failed.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_acm_connection_attempt_fail"></span><span id="WLAN_NOTIFICATION_ACM_CONNECTION_ATTEMPT_FAIL"></span>
<strong>wlan_notification_acm_connection_attempt_fail</strong>
0X0000000b</td>
<td><p>A connection attempt has failed.</p>
<p>A connection consists of one or more connection attempts. An application may receive zero or more <strong>wlan_notification_acm_connection_attempt_fail</strong> notifications between receiving the <strong>wlan_notification_acm_connection_start</strong> notification and the <strong>wlan_notification_acm_connection_complete</strong> notification.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706848(v=vs.85)"><strong>WLAN_CONNECTION_NOTIFICATION_DATA</strong></a> structure that identifies the network information for the connection attempt that failed.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_filter_list_change"></span><span id="WLAN_NOTIFICATION_ACM_FILTER_LIST_CHANGE"></span>
<strong>wlan_notification_acm_filter_list_change</strong>
0X0000000c</td>
<td><p>A change in the filter list has occurred, either through group policy or a call to the <a href="https://msdn.microsoft.com/en-us/library/ms706788(v=vs.85)"><strong>WlanSetFilterList</strong></a> function.</p>
<p>An application can call the <a href="https://msdn.microsoft.com/en-us/library/ms706729(v=vs.85)"><strong>WlanGetFilterList</strong></a> function to retrieve the new filter list.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_acm_interface_arrival"></span><span id="WLAN_NOTIFICATION_ACM_INTERFACE_ARRIVAL"></span>
<strong>wlan_notification_acm_interface_arrival</strong>
0X0000000d</td>
<td><p>A wireless LAN interface is been added to or enabled on the local computer.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_interface_removal"></span><span id="WLAN_NOTIFICATION_ACM_INTERFACE_REMOVAL"></span>
<strong>wlan_notification_acm_interface_removal</strong>
0X0000000e</td>
<td><p>A wireless LAN interface has been removed or disabled on the local computer.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_acm_profile_change"></span><span id="WLAN_NOTIFICATION_ACM_PROFILE_CHANGE"></span>
<strong>wlan_notification_acm_profile_change</strong>
0X0000000f</td>
<td><p>A change in a profile or the profile list has occurred, either through group policy or by calls to Native Wifi functions.</p>
<p>An application can call the <a href="https://msdn.microsoft.com/en-us/library/ms706743(v=vs.85)"><strong>WlanGetProfileList</strong></a> and <a href="https://msdn.microsoft.com/en-us/library/ms706738(v=vs.85)"><strong>WlanGetProfile</strong></a> functions to retrieve the updated profiles. The interface on which the profile list changes is identified by the <strong>InterfaceGuid</strong> member.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_profile_name_change"></span><span id="WLAN_NOTIFICATION_ACM_PROFILE_NAME_CHANGE"></span>
<strong>wlan_notification_acm_profile_name_change</strong>
0X00000010</td>
<td><p>A profile name has changed, either through group policy or by calls to Native Wifi functions.</p>
<p>The <strong>pData</strong> member points to a buffer that contains two NULL-terminated WCHAR strings, the old profile name followed by the new profile name.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_acm_profiles_exhausted"></span><span id="WLAN_NOTIFICATION_ACM_PROFILES_EXHAUSTED"></span>
<strong>wlan_notification_acm_profiles_exhausted</strong>
0X00000011</td>
<td><p>All profiles were exhausted in an attempt to autoconnect.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_network_not_available"></span><span id="WLAN_NOTIFICATION_ACM_NETWORK_NOT_AVAILABLE"></span>
<strong>wlan_notification_acm_network_not_available</strong>
0X00000012</td>
<td><p>The wireless service cannot find any connectable network after a scan.</p>
<p>The interface on which no connectable network is found is identified by identified by the <strong>InterfaceGuid</strong> member.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_acm_network_available"></span><span id="WLAN_NOTIFICATION_ACM_NETWORK_AVAILABLE"></span>
<strong>wlan_notification_acm_network_available</strong>
0X00000013</td>
<td><p>The wireless service found a connectable network after a scan, the interface was in the disconnected state, and there is no compatible auto-connect profile that the wireless service can use to connect .</p>
<p>The interface on which connectable networks are found is identified by the <strong>InterfaceGuid</strong> member.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_disconnecting"></span><span id="WLAN_NOTIFICATION_ACM_DISCONNECTING"></span>
<strong>wlan_notification_acm_disconnecting</strong>
0X00000014</td>
<td><p>The wireless service is disconnecting from a connectable network.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706848(v=vs.85)"><strong>WLAN_CONNECTION_NOTIFICATION_DATA</strong></a> structure that identifies the network information for the connection that is disconnecting.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_acm_disconnected"></span><span id="WLAN_NOTIFICATION_ACM_DISCONNECTED"></span>
<strong>wlan_notification_acm_disconnected</strong>
0X00000015</td>
<td><p>The wireless service has disconnected from a connectable network.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706848(v=vs.85)"><strong>WLAN_CONNECTION_NOTIFICATION_DATA</strong></a> structure that identifies the network information for the connection that disconnected.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_adhoc_network_state_change"></span><span id="WLAN_NOTIFICATION_ACM_ADHOC_NETWORK_STATE_CHANGE"></span>
<strong>wlan_notification_acm_adhoc_network_state_change</strong>
0X00000016</td>
<td><p>A state change has occurred for an adhoc network.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/aa816374(v=vs.85)"><strong>WLAN_ADHOC_NETWORK_STATE</strong></a> enumeration value that identifies the new adhoc network state.</p></td>
</tr>
<tr class="odd">
<td><span id="____wlan_notification_acm_profile_unblocked__"></span><span id="____WLAN_NOTIFICATION_ACM_PROFILE_UNBLOCKED__"></span>
<strong>wlan_notification_acm_profile_unblocked,</strong>
0X00000017</td>
<td><p>This value is supported on Windows 8 and later.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_screen_power_change"></span><span id="WLAN_NOTIFICATION_ACM_SCREEN_POWER_CHANGE"></span>
<strong>wlan_notification_acm_screen_power_change</strong>
0X00000018</td>
<td><p>The screen power has changed.</p>
<p>The <strong>pData</strong> member points to a <strong>BOOL</strong> value that indicates the value of the screen power change. When this value is <strong>TRUE</strong>, the screen changed to on. When this value is <strong>FALSE</strong>, the screen changed to off.</p>
<p>This value is supported on Windows 8 and later.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_acm_profile_blocked"></span><span id="WLAN_NOTIFICATION_ACM_PROFILE_BLOCKED"></span>
<strong>wlan_notification_acm_profile_blocked</strong>
0X00000019</td>
<td><p>This value is supported on Windows 8 and later.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_acm_scan_list_refresh"></span><span id="WLAN_NOTIFICATION_ACM_SCAN_LIST_REFRESH"></span>
<strong>wlan_notification_acm_scan_list_refresh</strong>
0X0000001a</td>
<td><p>This value is supported on Windows 8 and later.</p></td>
</tr>
</tbody>
</table>

 

The following values are possible when the **NotificationSource** member is equal to **WLAN\_NOTIFICATION\_SOURCE\_MSM**.

<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><span id="wlan_notification_msm_associating"></span><span id="WLAN_NOTIFICATION_MSM_ASSOCIATING"></span>
<strong>wlan_notification_msm_associating</strong>
0X00000001</td>
<td><p>A wireless device is in the process of associating with an access point or a peer station.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706897(v=vs.85)"><strong>WLAN_MSM_NOTIFICATION_DATA</strong></a> structure that contains connection-related information.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_msm_associated"></span><span id="WLAN_NOTIFICATION_MSM_ASSOCIATED"></span>
<strong>wlan_notification_msm_associated</strong>
0X00000002</td>
<td><p>The wireless device has associated with an access point or a peer station.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706897(v=vs.85)"><strong>WLAN_MSM_NOTIFICATION_DATA</strong></a> structure that contains connection-related information.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_msm_authenticating"></span><span id="WLAN_NOTIFICATION_MSM_AUTHENTICATING"></span>
<strong>wlan_notification_msm_authenticating</strong>
0X00000003</td>
<td><p>The wireless device is in the process of authenticating.</p>
<p>The <strong>pData</strong> member of the <strong>WLAN_NOTIFICATION_DATA</strong> structure points to a <a href="https://msdn.microsoft.com/en-us/library/ms706897(v=vs.85)"><strong>WLAN_MSM_NOTIFICATION_DATA</strong></a> structure that contains connection-related information.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_msm_connected"></span><span id="WLAN_NOTIFICATION_MSM_CONNECTED"></span>
<strong>wlan_notification_msm_connected</strong>
0X00000004</td>
<td><p>The wireless device is associated with an access point or a peer station, keys have been exchanged, and the wireless device is available to send data.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706897(v=vs.85)"><strong>WLAN_MSM_NOTIFICATION_DATA</strong></a> structure that contains connection-related information.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_msm_roaming_start"></span><span id="WLAN_NOTIFICATION_MSM_ROAMING_START"></span>
<strong>wlan_notification_msm_roaming_start</strong>
0X00000005</td>
<td><p>The wireless device is connected to an access point and has initiated roaming to another access point.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706897(v=vs.85)"><strong>WLAN_MSM_NOTIFICATION_DATA</strong></a> structure that contains connection-related information.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_msm_roaming_end"></span><span id="WLAN_NOTIFICATION_MSM_ROAMING_END"></span>
<strong>wlan_notification_msm_roaming_end</strong>
0X00000006</td>
<td><p>The wireless device was connected to an access point and has completed roaming to another access point.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706897(v=vs.85)"><strong>WLAN_MSM_NOTIFICATION_DATA</strong></a> structure that contains connection-related information.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_msm_radio_state_change"></span><span id="WLAN_NOTIFICATION_MSM_RADIO_STATE_CHANGE"></span>
<strong>wlan_notification_msm_radio_state_change</strong>
0X00000007</td>
<td><p>The radio state for an adapter has changed. Each physical layer (PHY) has its own radio state. The radio for an adapter is switched off when the radio state of every PHY is off.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706918(v=vs.85)"><strong>WLAN_PHY_RADIO_STATE</strong></a> structure that identifies the new radio state.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_msm_signal_quality_change"></span><span id="WLAN_NOTIFICATION_MSM_SIGNAL_QUALITY_CHANGE"></span>
<strong>wlan_notification_msm_signal_quality_change</strong>
0X00000008</td>
<td><p>A signal quality change for the currently associated access point or peer station.</p>
<p>The <strong>pData</strong> member points to a ULONG value for the WLAN_SIGNAL_QUALITY that identifies the new signal quality.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_msm_disassociating"></span><span id="WLAN_NOTIFICATION_MSM_DISASSOCIATING"></span>
<strong>wlan_notification_msm_disassociating</strong>
0X00000009</td>
<td><p>A wireless device is in the process of disassociating from an access point or a peer station.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706897(v=vs.85)"><strong>WLAN_MSM_NOTIFICATION_DATA</strong></a> structure that contains connection-related information.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_msm_disconnected"></span><span id="WLAN_NOTIFICATION_MSM_DISCONNECTED"></span>
<strong>wlan_notification_msm_disconnected</strong>
0X0000000a</td>
<td><p>The wireless device is not associated with an access point or a peer station.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706897(v=vs.85)"><strong>WLAN_MSM_NOTIFICATION_DATA</strong></a> structure that contains connection-related information. The <strong>wlanReasonCode</strong> member of the <strong>WLAN_MSM_NOTIFICATION_DATA</strong> structure indicates the reason for the disconnect.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_msm_peer_join"></span><span id="WLAN_NOTIFICATION_MSM_PEER_JOIN"></span>
<strong>wlan_notification_msm_peer_join</strong>
0X0000000b</td>
<td><p>A peer has joined an adhoc network.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706897(v=vs.85)"><strong>WLAN_MSM_NOTIFICATION_DATA</strong></a> structure that contains connection-related information.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_msm_peer_leave"></span><span id="WLAN_NOTIFICATION_MSM_PEER_LEAVE"></span>
<strong>wlan_notification_msm_peer_leave</strong>
0X0000000c</td>
<td><p>A peer has left an adhoc network.</p>
<p>The <strong>pData</strong> member of the <strong>WLAN_NOTIFICATION_DATA</strong> structure points to a <a href="https://msdn.microsoft.com/en-us/library/ms706897(v=vs.85)"><strong>WLAN_MSM_NOTIFICATION_DATA</strong></a> structure that contains connection-related information.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_notification_msm_adapter_removal"></span><span id="WLAN_NOTIFICATION_MSM_ADAPTER_REMOVAL"></span>
<strong>wlan_notification_msm_adapter_removal</strong>
0X0000000d</td>
<td><p>A wireless adapter has been removed from the local computer.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/ms706897(v=vs.85)"><strong>WLAN_MSM_NOTIFICATION_DATA</strong></a> structure that contains connection-related information.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_notification_msm_adapter_operation_mode_change"></span><span id="WLAN_NOTIFICATION_MSM_ADAPTER_OPERATION_MODE_CHANGE"></span>
<strong>wlan_notification_msm_adapter_operation_mode_change</strong>
0X0000000e</td>
<td><p>The operation mode of the wireless device has changed.</p>
<p>The <strong>pData</strong> member points to a ULONG that identifies the new operation mode.</p></td>
</tr>
</tbody>
</table>

 

The following values are possible when the **NotificationSource** member is equal to **WLAN\_NOTIFICATION\_SOURCE\_HNWK**.

<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><span id="wlan_hosted_network_state_change"></span><span id="WLAN_HOSTED_NETWORK_STATE_CHANGE"></span>
<strong>wlan_hosted_network_state_change</strong>
0x00001000</td>
<td><p>The wireless Hosted Network state has changed.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/dd439509(v=vs.85)"><strong>WLAN_HOSTED_NETWORK_STATE_CHANGE</strong></a> structure that identifies the state change.</p></td>
</tr>
<tr class="even">
<td><span id="wlan_hosted_network_peer_state_change"></span><span id="WLAN_HOSTED_NETWORK_PEER_STATE_CHANGE"></span>
<strong>wlan_hosted_network_peer_state_change</strong>
0x00001001</td>
<td><p>The wireless Hosted Network peer state has changed.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/dd439500(v=vs.85)"><strong>WLAN_HOSTED_NETWORK_DATA_PEER_STATE_CHANGE</strong></a> structure that identifies the peer state change.</p></td>
</tr>
<tr class="odd">
<td><span id="wlan_hosted_network_radio_state_change"></span><span id="WLAN_HOSTED_NETWORK_RADIO_STATE_CHANGE"></span>
<strong>wlan_hosted_network_radio_state_change</strong>
0x00001002</td>
<td><p>The wireless Hosted Network radio state has changed.</p>
<p>The <strong>pData</strong> member points to a <a href="https://msdn.microsoft.com/en-us/library/dd439505(v=vs.85)"><strong>WLAN_HOSTED_NETWORK_RADIO_STATE</strong></a> structure that identifies the radio state change.</p></td>
</tr>
</tbody>
</table>

 
  • 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.

The WLAN_NOTIFICATION_DATA structure is a typedef to the L2_WLAN_NOTIFICATION_DATA structure which is defined in the L2cmn.h header file which is automatically included by the Wlanapi.h header file. The L2cmn.h header file should never be used directly.

Requirements

Minimum supported client

Windows Vista, Windows XP with SP3 [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Redistributable

Wireless LAN API for Windows XP with SP2

Header

L2cmn.h (include Wlanapi.h)

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