How to determine and recover from Winsock2 corruption