I:inet_ntoa
举例:char *ipaddr=NULL;
char addr[20];
in_addr inaddr;
inaddr.s_addr=***;
ipaddr=inet_ntoa(inaddr);
strcpy(addr,ipaddr);
II:
IntIP=... //int ip address
Byte A = Byte(this-> IntIP >> 24);
Byte B = Byte(this-> IntIP >> 16);
Byte C = Byte(this-> IntIP >> 8);
Byte D = Byte(this-> IntIP);
Text1 = IntToStr(A);
Text2 = IntToStr(B);
Text3 = IntToStr(C);
Text4 = IntToStr(D);
阅读(4383) | 评论(0) | 转发(0) |