#include #include #include int main( int argc, char **argv ) { WSADATA wsaData = {0}; int iResult = 0; SOCKET sock = INVALID_SOCKET; if( WSAStartup(MAKEWORD(2, 2), &wsaData) != 0 ) { printf( "WSAStartup failed: %d\n", iResult); return 1; } sock = socket( AF_UNIX, SOCK_DGRAM, IPPROTO_TCP ); if( sock == INVALID_SOCKET ) printf( "socket function failed with error = %d\n", WSAGetLastError() ); else { printf( "socket function succeeded\n" ); iResult = closesocket( sock ); if( iResult == SOCKET_ERROR ) { printf( "closesocket failed with error = %d\n", WSAGetLastError() ); WSACleanup(); return 1; } } WSACleanup(); return 0; }