arpie.b
2007-01-23 08:27:07 UTC
OK, I've been digging around trying to find a good way to do this, and
have managed to find several half-baked ways of doing it - hoping
someone else has had better luck and can point me in the right direction...
I need to have my application be notified when a network connection
(wired OR wireless) is established or lost, and be able to discern which
network connection it was (wired - domain, wireless - SSID). So far I
have looked at WMI, SENS, NLA, WLAN API, and Winsock but none of these
implementations (or code samples I've seen) seem to do much more than
say "yep, you're connected!" or "uh-oh - no more network..." unless you
install tons of extra SDK/DDK/API/hotfixes/etc to the client system.
Does anyone know of a simple, small, event-driven way to:
1. Have an application be notified of a change in network connectivity...
2. Let the application know what type of network it was (wired vs
wireless)...
3. In the case of wired, provide a means of retrieving the domain that
was connected to (ideally also the domain that was disconnected from,
but not a requirement)...
4. In the case of wireless, provide a means of retrieving the SSID that
was connected to (ideally also the SSID that was disconnected from, but
not a requirement)...
5. AND use a minimal set of APIs that are native on Windows XP and don't
require 100MB of patches/downloads to get my 500KB VB or C++ app to run!
Thanks!
-R
have managed to find several half-baked ways of doing it - hoping
someone else has had better luck and can point me in the right direction...
I need to have my application be notified when a network connection
(wired OR wireless) is established or lost, and be able to discern which
network connection it was (wired - domain, wireless - SSID). So far I
have looked at WMI, SENS, NLA, WLAN API, and Winsock but none of these
implementations (or code samples I've seen) seem to do much more than
say "yep, you're connected!" or "uh-oh - no more network..." unless you
install tons of extra SDK/DDK/API/hotfixes/etc to the client system.
Does anyone know of a simple, small, event-driven way to:
1. Have an application be notified of a change in network connectivity...
2. Let the application know what type of network it was (wired vs
wireless)...
3. In the case of wired, provide a means of retrieving the domain that
was connected to (ideally also the domain that was disconnected from,
but not a requirement)...
4. In the case of wireless, provide a means of retrieving the SSID that
was connected to (ideally also the SSID that was disconnected from, but
not a requirement)...
5. AND use a minimal set of APIs that are native on Windows XP and don't
require 100MB of patches/downloads to get my 500KB VB or C++ app to run!
Thanks!
-R