CDLLLoader.hpp

Go to the documentation of this file.
00001 #ifndef __CDLLLoader__
00002 #define __CDLLLoader__
00003 
00004 #include "../Basics/CString.hpp"
00005 using Exponent::Basics::CString;
00006 
00007 //  ===========================================================================
00008 
00009 namespace Exponent
00010 {
00011     namespace Host
00012     {
00031         class CDLLLoader : public CCountedObject
00032         {
00034             EXPONENT_CLASS_DECLARATION;
00037 //  ===========================================================================
00038 
00039         public:
00040 
00041 //  ===========================================================================
00042 
00046             CDLLLoader();
00047 
00053             CDLLLoader(const CString &dllName);
00054 
00058             virtual ~CDLLLoader();
00059 
00060 //  ===========================================================================
00061 
00067             void loadDLL(const CString &dllName);
00068 
00072             void unloadDLL();
00073 
00074 //  ===========================================================================
00075 
00081             void *getFunction(const CString &functionName);
00082 
00083 //  ===========================================================================
00084 
00086             #ifdef WIN32
00087 
00092                 HMODULE getDllHandle() const { return m_dllHandle; }
00094             #else
00095 
00100                 CFBundleRef getDllHandle() const { return m_dllHandle; }
00102             #endif
00103 
00105 //  ===========================================================================
00106 
00107         protected:
00108 
00109 //  ===========================================================================
00110 
00111             CString m_dllName;              
00113             #ifdef WIN32
00114 
00115                 HMODULE m_dllHandle;        
00117             #else
00118 
00119                 CFBundleRef m_dllHandle;    
00121             #endif
00122 
00123         };
00124     }
00125 }
00126 #endif  // End of CDLLLoader.hpp

Infinity API - CDLLLoader.hpp Source File generated on 7 Mar 2007