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
51 lines
1.2 KiB
//-----------------------------------------------------------------------------
|
|
//
|
|
// File: loadlib.h
|
|
// Copyright (C) 1994-1997 Microsoft Corporation
|
|
// All rights reserved.
|
|
//
|
|
// Class to manage LoadLibray/FreeLibary style DLL usage.
|
|
//
|
|
//-----------------------------------------------------------------------------
|
|
|
|
#ifndef ESPUTIL_LOADLIB_H
|
|
#define ESPUTIL_LOADLIB_H
|
|
|
|
|
|
#pragma warning(disable : 4251)
|
|
class LTAPIENTRY CLoadLibrary
|
|
{
|
|
public:
|
|
NOTHROW CLoadLibrary(void);
|
|
NOTHROW CLoadLibrary(const CLoadLibrary &);
|
|
|
|
NOTHROW BOOL LoadLibrary(const TCHAR *szFileName);
|
|
NOTHROW BOOL FreeLibrary(void);
|
|
|
|
NOTHROW void WrapLibrary(HINSTANCE);
|
|
|
|
NOTHROW void operator=(const CLoadLibrary &);
|
|
|
|
NOTHROW HINSTANCE GetHandle(void) const;
|
|
NOTHROW HINSTANCE ExtractHandle(void);
|
|
NOTHROW operator HINSTANCE(void) const;
|
|
|
|
NOTHROW FARPROC GetProcAddress(const TCHAR *) const;
|
|
|
|
NOTHROW const CString & GetFileName(void) const;
|
|
|
|
NOTHROW ~CLoadLibrary();
|
|
|
|
private:
|
|
CString m_strFileName;
|
|
HINSTANCE m_hDll;
|
|
};
|
|
|
|
|
|
#pragma warning(default : 4251)
|
|
|
|
#if !defined(_DEBUG) || defined(IMPLEMENT)
|
|
#include "loadlib.inl"
|
|
#endif
|
|
|
|
#endif
|