Class Hierarchy   Class Index   Method Index  

CHMdllClass.h

00001 #ifndef __CHM_DLL_CLASS_H__
00002 #define __CHM_DLL_CLASS_H__
00003 //---------------------------------------------------------------------------
00004 // Copyright (C) 1997-2008 iNTERFACEWARE Inc. All Rights Reserved
00005 //
00006 // Module: CHMdllClass
00007 //
00008 // Description:
00009 //
00010 // Class which wraps basic shared library and dll functionality in an
00011 // operating system independent manner.
00012 //
00013 // Author: Steven Dodd
00014 // Date:   Jan 19, 2009
00015 // Revision: $Revision: 1.1 $
00016 //
00017 // Last Edit Date: $Date: 2009-01-21 15:08:14 $
00018 // Source: $Source: /home/cvs/cvsroot/CHM/CHMdllClass.h,v $
00019 //---------------------------------------------------------------------------
00020 
00021 #include <CHM/CHMminimumInclude.h>
00022 #include <CHM/CHMstring.h>
00023 
00024 class CHMdll
00025 {
00026 public:
00027    CHMdll();
00028    virtual ~CHMdll();   
00029 
00030    void loadLibrary(const CHMstring& DllFileName, CHMboolean IsOwner=true);
00031    
00032    void freeLibrary();
00033    
00034    void* getProcAddress(const char* ProcName);
00035 
00036    CHMstring libraryName() const;
00037 
00038 private:
00039    CHMdllHandle DllHandle;
00040    CHMdll& operator=(const CHMdll& Orig); // not allowed 
00041    CHMdll(const CHMdll& Orig); // not allowed
00042 };
00043 
00044 #endif // end of defensive include