int main() { char host_name[256]; // define host name (for example:xxx-PC) int WSA_return, i; WSADATA WSAData; HOSTENT *host_entry; // record host information WORD wVersionRequested;
wVersionRequested = MAKEWORD(2, 0); WSA_return = WSAStartup(wVersionRequested, &WSAData); // initialize Winsock service and then call other socket or dll file