//域名解析为IP
//host_entry=gethostbyname(HOSTNAME/*host_name*/);
//if(host_entry!=0)
//{
// //printf("解析IP地址: ");
// sprintf(pIP, "%d.%d.%d.%d",
// (host_entry->h_addr_list[0][0]&0x00ff),
// (host_entry->h_addr_list[0][1]&0x00ff),
// (host_entry->h_addr_list[0][2]&0x00ff),
// (host_entry->h_addr_list[0][3]&0x00ff));
//}
//TRACE(pIP);
GetAdaptersInfo
The GetAdaptersInfo function retrieves adapter information for the local computer.
Windows Server 2003 and Windows XP: Use the GetAdaptersAddresses function instead of GetAdaptersInfo.