There is an example of using WSAEnumNetworkEvents here.

After calling WSAEnumNetworkEvents you can use the WSANETWORKEVENTS structure to determine which events that has occured and if they failed or not.

- petter