IPLocater.h
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:1k
源码类别:

P2P编程

开发平台:

Visual C++

  1. // IPLocater.h: interface for the CIPLocater class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_IPLOCATER_H__F23CEF63_F428_4B40_93E4_A0EC9FC83D9D__INCLUDED_)
  5. #define AFX_IPLOCATER_H__F23CEF63_F428_4B40_93E4_A0EC9FC83D9D__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CIPLocater  
  10. {
  11. public:
  12. CIPLocater();
  13. virtual ~CIPLocater();
  14. BOOL Create(CString strIPdbpath);
  15. BOOL IsCreate() const;
  16. bool FindIPName(ULONG lIP, CString& strName) const;
  17. bool FindIPName(CString strIP, CString &strName)const;
  18. private:
  19. vector<CString> m_vCountry;
  20. vector<CSize> m_vIndex;
  21. char* m_pBuf;
  22. bool m_bCreate;
  23. long m_lBufCount;
  24. };
  25. #endif // !defined(AFX_IPLOCATER_H__F23CEF63_F428_4B40_93E4_A0EC9FC83D9D__INCLUDED_)