我在给wlanapi写一种包装纸。当通过WlanRegisterNotification接收通知时,我得到了带有代码59
(在十六进制中是0x3B
)的意外媒体特定模块(MSM)通知。MSM MSDN页面不包含任何有用的信息。我的wlanapi.h
也不包含这样的值,事实上,这个枚举是基于零的,并且只包含从0
到17
的18
值。
是否有人知道这类通知的含义,以及为何根本没有记录在案?
,这是我到目前为止所拥有的。
看起来,此通知是常规连接过程的一部分。也就是说,我在连接到无线网络时得到了它--不管以前的连接状态如何。以下是每次连接到网络时发生的通知序列:
wlan_notification_msm_associating
wlan_notification_msm_associated
wlan_notification_msm_authenticating
59 (0x3B)
wlan_notification_msm_signal_quality_change
wlan_notification_msm_associated
和wlan_notification_msm_authenticating
在同一时间内触发,然后立即(以10-20毫秒为单位)用代码59
(0x3F
)发出通知。
此通知有16字节的有效负载。数据结构在我看来并不熟悉,如果某人看起来很熟悉(10个事件),请发布此信息:
80805E08 009B0000 F1F10800 C400D634 <-- Switching between two networks here and below in random order
D0D049FA 009B0000 A6A60800 01542A00
80805E08 009B0000 696902FF 00FF4C6F
80805E08 00C40000 04040E00 000093DF
80805E08 009B0000 04040900 6F009361 <-- Diconnect and connect to the same network
80805E08 009B0000 04000700 00009340 <-- Diconnect and connect to the same network
64640000 00450002 0400114D 00009363 <-- Disconnect and connect to another network
80805E08 009B0000 04040511 005B93E8 <-- Diconnect and connect to the same network
58580000 00450002 04000904 3D4293A1 <-- Connect to another network (i. e. switch)
80805E08 009B0000 04040100 10919316 <-- Connect to another network (i. e. switch)
有用链接
会感谢你的帮助!
更新1通知序列在通过官方样品连接时相同
HandleAcmNotification(type = ConnectionStart)
HandleMsmNotification(type = Associating)
HandleMsmNotification(type = Associated)
HandleMsmNotification(type = Authenticating)
HandleMsmNotification(type = Code59)
HandleMsmNotification(type = SignalQualityChange)
HandleMsmNotification(type = Connected)
HandleAcmNotification(type = ConnectionComplete)
更新2为此目的,我在GitHub上创建了一个最小的测试项目-- https://github.com/alexbereznikov/wlanapi-notification-code59-test。
二进制x64版本位于这里- https://github.com/alexbereznikov/wlanapi-notification-code59-test/releases。
在成功连接到无线网络后,我将获得以下输出:
发布于 2020-10-21 02:21:07
这是故意的。
0n59通知代码是在无线网络可能正在经历网络速度变化时由OS处理的私有通知代码。
对于end developer,这应该被end developer忽略,因为它没有文档化,而且将来可能会更改,因为它是由底层操作系统处理的私有通知。
注意:当禁用和重新启用无线网络时,这只会在较新的操作系统(Windows10)上发送。此通知不发送给旧操作系统(例如,Windows7,Windows8.1)
https://stackoverflow.com/questions/63916457
复制相似问题