Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.2 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: loadlib.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // Class to manage LoadLibray/FreeLibary style DLL usage.
  8. //
  9. //-----------------------------------------------------------------------------
  10. #ifndef ESPUTIL_LOADLIB_H
  11. #define ESPUTIL_LOADLIB_H
  12. #pragma warning(disable : 4251)
  13. class LTAPIENTRY CLoadLibrary
  14. {
  15. public:
  16. NOTHROW CLoadLibrary(void);
  17. NOTHROW CLoadLibrary(const CLoadLibrary &);
  18. NOTHROW BOOL LoadLibrary(const TCHAR *szFileName);
  19. NOTHROW BOOL FreeLibrary(void);
  20. NOTHROW void WrapLibrary(HINSTANCE);
  21. NOTHROW void operator=(const CLoadLibrary &);
  22. NOTHROW HINSTANCE GetHandle(void) const;
  23. NOTHROW HINSTANCE ExtractHandle(void);
  24. NOTHROW operator HINSTANCE(void) const;
  25. NOTHROW FARPROC GetProcAddress(const TCHAR *) const;
  26. NOTHROW const CString & GetFileName(void) const;
  27. NOTHROW ~CLoadLibrary();
  28. private:
  29. CString m_strFileName;
  30. HINSTANCE m_hDll;
  31. };
  32. #pragma warning(default : 4251)
  33. #if !defined(_DEBUG) || defined(IMPLEMENT)
  34. #include "loadlib.inl"
  35. #endif
  36. #endif