If I have a MFC program that opens a socket connection, how would I test to see if the socket has succesfully opened or not?
almost any function in the winsock api returns the value SOCKET_ERROR in the event of failure. you only have to check this for errors. if you want details on the error number, you can use the GetLastError() function that will give the number of the error occured. Look up in the msdn link for error codes for a text explanation. you can also use the FormatMessage() function to programatically get the text explanation.