Library.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:1k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /********************************************************************
  2. created: 2003/04/21
  3. file base: Library
  4. file ext: h
  5. author: liupeng
  6. purpose:
  7. *********************************************************************/
  8. #ifndef __INCLUDE_LIBRARY_H__
  9. #define __INCLUDE_LIBRARY_H__
  10. #if defined (_MSC_VER) && (_MSC_VER >= 1020)
  11. #pragma once
  12. #endif
  13. #ifndef _WINDOWS_
  14. #define WIN32_LEAN_AND_MEAN
  15. #include <windows.h>
  16. #undef WIN32_LEAN_AND_MEAN
  17. #endif
  18. #include "tstring.h"
  19. /*
  20.  * namespace OnlineGameLib::Win32
  21.  */
  22. namespace OnlineGameLib {
  23. namespace Win32 {
  24. class CLibrary
  25. {
  26. public:
  27. CLibrary( const char * const lpFileName );
  28. CLibrary();
  29. virtual ~CLibrary();
  30. bool Load( const char * const lpFileName );
  31. bool Free();
  32. FARPROC GetProcAddress( LPCSTR lpProcName ) { return ::GetProcAddress( m_hInst, lpProcName ); };
  33. private:
  34. _tstring m_sFileName;
  35. HMODULE m_hInst;
  36. };
  37. } // End of namespace OnlineGameLib
  38. } // End of namespace Win32
  39. #endif // __INCLUDE_LIBRARY_H__