龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > VC开发 >

使用TCP堆栈来Ping计算机(2)

时间:2009-12-30 15:42来源:未知 作者:admin 点击:
分享到:
CString GetIP(unsigned long ulIP); // Overrides public: // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CIcmpEcho) //}}AFX_VIRTUAL // Generated message map functions //{{AF

  CString GetIP(unsigned long ulIP);

  // Overrides
  public:
  // ClassWizard generated virtual function overrides
  //{{AFX_VIRTUAL(CIcmpEcho)
  //}}AFX_VIRTUAL

  // Generated message map functions
  //{{AFX_MSG(CIcmpEcho)
  // NOTE - the ClassWizard will add and remove member functions here.
  //}}AFX_MSG

  // Implementation
  protected:
  };
  /////////////////////////////////////////////////////////////////////////////
  //*
  //-------------------------------------------------------------------------------------------  -----------------------
  //icmpecho.cpp
  //-------------------------------------------------------------------------------------------  -----------------------
  //*
  // IcmpEcho.cpp : implementation file
  //

  #include "IcmpEcho.h"

  extern "C" {
  #include "ipexport.h"
  #include "icmpapi.h"
  }

  #define PING_TIMEOUT 100

  #ifdef _DEBUG
  #define new DEBUG_NEW
  #undef THIS_FILE
  static char THIS_FILE[] = __FILE__;
  #endif

  /////////////////////////////////////////////////////////////////////////////
  // CIcmpEcho

  CIcmpEcho::CIcmpEcho()
  {
  }

  CIcmpEcho::~CIcmpEcho()
  {
  }

  // Do not edit the following lines, which are needed by ClassWizard.
  #if 0
  BEGIN_MESSAGE_MAP(CIcmpEcho, CSocket)
  //{{AFX_MSG_MAP(CIcmpEcho)
  //}}AFX_MSG_MAP
  END_MESSAGE_MAP()
  #endif // 0

  /////////////////////////////////////////////////////////////////////////////
  // CIcmpEcho member functions
  unsigned long CIcmpEcho::ResolveIP(CString strIP)
  {

精彩图集

赞助商链接