//得到本机名称
char hostName[256];
gethostname(hostName,256);
//得到本机IP
char hostAddress[256];
HOSTENT *hostEntry;
hostEntry=gethostbyname(hostName);
wsprintf(hostAddress , "%d.%d.%d.%d" ,
(hostEntry>h_addr_list[0][0]&0x00ff) ,
(hostEntry->h_addr_list[0][1]&0x00ff) ,
(hostEntry->h_addr_list[0][2]&0x00ff) ,
(hostEntry->h_addr_list[0][3]&0x00ff)
);
iceIpCheck 查询IP简单信息小工具
http://114.246.94.98/src/iceIpCheck.src.rar
另外,团IDC网上有许多产品团购,便宜有口碑