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.

26 lines
682 B

  1. // DynamLnk.h : Base class for DLLs which are loaded only when needed
  2. #ifndef __DYNAMLNK_H_INCLUDED__
  3. #define __DYNAMLNK_H_INCLUDED__
  4. class DynamicDLL
  5. {
  6. public:
  7. // These strings must remain unchanged until the FileServiceProvider is released
  8. DynamicDLL(LPCTSTR ptchLibraryName, LPCSTR* apchFunctionNames);
  9. virtual ~DynamicDLL();
  10. BOOL LoadFunctionPointers();
  11. FARPROC QueryFunctionPtr(INT i) const;
  12. inline FARPROC operator[] (INT i) const
  13. { return QueryFunctionPtr(i); }
  14. private:
  15. HMODULE m_hLibrary;
  16. FARPROC* m_apfFunctions;
  17. LPCTSTR m_ptchLibraryName;
  18. LPCSTR* m_apchFunctionNames;
  19. INT m_nNumFunctions;
  20. };
  21. #endif // ~__DYNAMLNK_H_INCLUDED__