I have the following code that has worked just fine up until Windows 7 (64 bit addressing):
int addr_fam = AF_INET;
int socket_type = SOCK_STREAM;
SOCKET conn_socket;
conn_socket = socket(addr_fam, socket_type, 0);
Currently, conn_socket is set to -1 and using WSAGetLastError() and FormatMessage I get the message "An invalid argument was supplied".
I have found nothing to suggest that this is all of a sudden an invalid combination of arguments but apparently, at least in my case, it is.
Does anyone have any insight into why this would be the case? Any idea how I can determine which of the 3 arguments the system thinks is invalid?
*** NEW INFO ***
This only occurs in DevStudio while in debug mode. The Release version of the code still works OK.