亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        API函數(shù)得到本機(jī)的IP

        字號:

        struct hostent *thisHost;
            struct in_addr in;
            char MyName[80];
            char *IP,*ptr;
            if(gethostname (MyName,80)==SOCKET_ERROR)
            return NULL;
            if(!(thisHost = gethostbyname(MyName)))
            return NULL;
            memset((void *)&in,sizeof(in),0);
            in.s_addr=*((unsigned long *)thisHost->h_addr_list[0]);
            if(!(ptr = inet_ntoa(in)))
            return NULL;
            IP = new char[strlen(ptr)+1],
            strcpy(IP,ptr);
            return IP;考試大(www.Examda。com)
            考試大提示:是在vc下編的,而這兩個函數(shù)是api函數(shù),delphi應(yīng)該也能用。