[Wlanapi] WLAN_NOTIFICATION_MSM NotificationCode 59


I'm working on a small Wifi tool using wlanapi in vs2019.
I'm outputting the wlan notifications to the output window and constantly witnessing an unknown notification code numbered 59, which is not documented anywhere; the WLAN_NOTIFICATION_MSM enum has only 17 code enumerations.

I cannot find better explanation for this (and maybe even more?) code anywhere. Can someone help to find this out?

The logged notifications looking like:
ACM ScanComplete
ACM ScanListRefresh
MSM 59
MSM SignalQualityChange
MSM SignalQualityChange
MSM 59
MSM SignalQualityChange
MSM 59

Thank you in advance!
Anyone saw this before please?
I doubt I'll be able to help too, but why not show the part of the code that prints "MSM 59"? What function call is actually producing that number?
At a guess, it's something bespoke coming out of whatever 3rd party driver you have installed.
someone has the same issue as you, maybe the answer they got helps:

is your library open source? Can you grep it out of that?
If not, you can try hex edit the library file but that is going to be hit or miss and kind of a desperation approach, but there isnt much on the web for whatever this is.

speaking of which: libraries with no users --- avoid and use something else is my plan for stuff that does not work and has little to no web presence.
Last edited on
Thank you for the answers; this is coming right from wlanapi (wlanapi.h):

I was also thinking that maybe this undocumented code is presented by some 3rd party driver, but it doesn't matter what kind of wlan dongle/built-in device i try, the message approaches all the time.
Its all Windows 10 ver.2004 i tried, so maybe this is something new, no idea, but i find it strange that the corresponding enum is also not containing this (or maybe even more) code(s) in the newest Windows SDK header (wlanapi.h) either.
Of course its not a big deal, but these kind of things make me curious.

I'm using this in C# through interop, so there is no magic anywhere at all.
I was also thinking about some hex-edit lookaround, but since it is not included in wlanapi.h, probably it is not to be found built in anywhere. Assembly i don't know, so more i cannot do here i think.
About all I was able to find via digging is that this is a 32 bit tool, microsoft has hidden the enum list for parts of it (their doc pages go to 404 not found!) and there isnt a lot of relic info online about it either.

hex edit of binary files often find nuggets of text. Other times, little. Its hit or miss, but you would be amazed at what you can data mine from programs. If looking at it in hex annoys you, write something that only captures values between a-z and A-Z with spaces, and dump the binary to at text file, extra fancy, only dump if you have say > 3 letters in a row. This usually either has what you want or its not there. A few things are in unicode and every other letter is (zero byte?) --- may try a scan for that too, but its less common.

sometimes these error codes are produced by and / or logic of other error codes to tell you that there are 2+ errors. Some systems are set up that way so in binary or hex, this does not damage anything but packs more info into a 'number'.

also you could step the program in debugger to see if, even in assembly, you can find the offending condition that triggers it. It would be tedious, but you may find something like 'if something do this' that is readable even if you don't know the language. Then if you can eliminate the condition...

I got nothing: seems like a 'pick another tool' situation.
Last edited on
Has anyone had any luck investigating MSM NotificationCode 59 meaning? Faced the same issue yesterday, still have no idea what is it. Looks like it is regular notification, but the fact that both sources and documentation miss code 59 is very confusing to me.

P.S. I'm afraid there is no another tool - this is a WLANAPI notification, that is, it is a part of Windows.
Last edited on
I'm getting this notification when performing either connection to network (from disconnected state) or network switch (from connected state). Looks like it is the part of regular connection process, here is my sequence:

59 (0x3B)

These two notification happen in the same moment of time (at least as stated in logs):

And almost immediately (in 10-20 milliseconds) arrives notification with code 59 (0x3F).
This notification has 16-bytes payload, posting here examples in hex in case if it will look familiar to someone:
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)
Here is the related stackoverflow question in case if someone is interested - https://stackoverflow.com/questions/63916457/wlan-notification-msm-notificationcode-59
I've got an answer from MSFT:

This is by design.

The 0n59 notification code is a private notification code that is processed by the OS when the wireless network may be undergoing a network speed change.

For the end developer, this should be ignored by the end developer as it is not documented and subject to change in the future since it is a private notification handled by underlying OS.

See https://stackoverflow.com/a/64455769/1828989
Topic archived. No new replies allowed.