#include #include #include #include #include #include #include #include #include #include #include #include #include _cdecl main(int argc, char **argv) { WSADATA wsaData; BYTE AddrBuffer[1000]; DWORD AddrBufLen = 1000; LPCSADDR_INFO lpCSAddrInfo = (LPCSADDR_INFO) AddrBuffer; GUID ServiceType = SVCID_NAMESERVER_UDP; DWORD err; WSAStartup( MAKEWORD(1, 1), &wsaData ); err = GetAddressByName( 0, &ServiceType, NULL, NULL, 0, NULL, lpCSAddrInfo, &AddrBufLen, NULL, NULL ); if ( err <= 0 ) return INVALID_SOCKET; WSACleanup(); return( 0 ); }