Reputation: 5861
Is there a way to get a notification when a new Wifi Network has been detected?
I glanced through the Native Wifi API Reference and found the WlanRegisterNotification function but I'm not sure if that includes what i am looking for. The remark does not mention it.
Upvotes: 0
Views: 474
Reputation: 6728
Yes, WlanRegisterNotification
is indeed the correct function. You need to do a little digging in the documentation to find exactly what each notification provides, by looking at WLAN_NOTIFICATION_DATA
(in the remarks section for WlanRegisterNotification
), then WLAN_NOTIFICATION_ACM
†. Specifically, you're looking for one of these two notifications:
wlan_notification_acm_network_available
Which gives a notification when a connectable network is detected, and you're not currently connected to another network, and there isn't an automatic connection available.wlan_notification_acm_scan_list_refresh
(Windows 8+)† ACM stands for "auto configuration module"
Upvotes: 1