if (Newlength > 0) { sHost.resize(Newlength); WideCharToMultiByte (CP_ACP, WC_COMPOSITECHECK, wsHost.c_str(), wsHost.length(), &sHost[0], Newlength, NULL, NULL); } HOSTENT *pHostEnt2 = gethostbyname(sHost.c_str()); if (!pHostEnt2) { printf("\n Unknown Website IP"); } else { for (char **addr = pHostEnt2->h_addr_list; *addr != NULL; ++addr) { printf("\n Website IP: %s \n", inet_ntoa(* (struct in_addr *) *addr)); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)