*** New wrinkle - Another programmer at my work has no problem with this code. However, he appears to have a different version of WS2_32.lib than I do. My WS2_32.lib seems to be an older version than what he has. I cannot find anything online regarding versions of WS2_32.lib. Does anyone have any ideas that might shed some light on this issue? ***
#include <winsock2.h>
int main(int argc, char **argv)
{
int ver=2, rev=2, retval;
WORD wVersionRequested = MAKEWORD(ver,rev);
WSADATA wsaData;
SOCKET listen_socket;
retval = WSAStartup(wVersionRequested,&wsaData);
listen_socket = socket(AF_INET, SOCK_STREAM, 0);
if (listen_socket == INVALID_SOCKET)
{
m = WSAGetLastError();
}
}
running on Windows 7
using Visual Studio 2008 Pro Edition
changing 3rd socket parameter from 0 to IPPROTO_TCP did not alter the outcome
This is the entire program.
Any answers, theories or wild guesses will be appreciated