不是DOS下的那种。
具体要引用哪些头文件,方法怎么实现?谢谢。

解决方案 »

  1.   

    windows网络编程技术 书里边有
      

  2.   

    为什么回复的都是《windows网络编程技术》书里有
    为书做广告?
      

  3.   

    CPing   --   Easily   ping   a   host   from   Windows   95   and   Windows   NT     
      http://www.codeguru.com/internet/cping.shtml   
        
    IP   Address   Swapping     
      http://www.codeguru.com/internet/ipswap.html   
        
    A   New   Way   to   Ping     
      http://www.codeguru.com/internet/NewPing.html   
        
    Exploring   Trace   Routes     
      http://www.codeguru.com/internet/TraceRoutes.html
      

  4.   

    另外这本书上也有Windows网络与通信程序设计还有baidu,google肯定有
    因为我之前找过
      

  5.   

    为什么回复的都是《windows网络编程技术》书里有
    ----------------------------------------------
    因为这本书里的确有 
    P124页开始
      

  6.   

    不过楼主最好在这个基础上写:
    #include "stdafx.h"
    #include <iostream>   
    #include <stdlib.h>
    #include <string> 
    #include <winsock2.h>
    #include <winsock.h>
    using   namespace   std;
    #pragma comment(lib,"Iphlpapi.lib")
    #pragma comment(lib,"ws2_32")class Pet { public: virtual ~Pet(){}}; 
    int _tmain(int argc, _TCHAR* argv[])
    { WSADATA WSAData;
    if (WSAStartup(MAKEWORD(2,2),&WSAData)!=0)
        {
            printf("WSAStartup error.Error:%d\n",WSAGetLastError());
            return 0;
        }
    cin.ignore();
    return 0;
    }这个好像书上没写^_^
      

  7.   

    class Pet { public: virtual ~Pet(){}};
    这句话没用
      

  8.   

    你搜索下ICMP 然后改写下就成
    就用到了原始套界字的 +  ICMP
    也可以用他提供的ICMP.DLL
      

  9.   

    为什么回复的都是《windows网络编程技术》书里有
    ----------------------------------------------
    因为这本书里的确有 
      

  10.   

    随便google下也能找到代码...SDK下都有直接的例子