Possible Duplicate:
Is there a Windows hook for when the internet is connected/disconnected?
I could do an endless timer checking IsInetOffline(), but I would prefer a hook callback that tells me when I plug/unplug the ethernet network cable or connect to wireless internet. Is there such a thing in the Windows API?