Load library at runtime

This commit is contained in:
Friedemann Kleint
2009-02-23 16:13:35 +01:00
parent c6821e8a92
commit 2cf1e2431e
4 changed files with 106 additions and 31 deletions

View File

@@ -43,9 +43,27 @@ namespace Internal {
class DebuggerManager;
class IDebuggerManagerAccessForEngines;
// Thin wrapper around the 'DBEng' debugger engine shared library
// which is loaded at runtime.
class DebuggerEngineLibrary {
public:
DebuggerEngineLibrary();
bool init(QString *errorMessage);
inline HRESULT debugCreate(REFIID interfaceId, PVOID *interfaceHandle) const
{ return m_debugCreate(interfaceId, interfaceHandle); }
private:
// The exported functions of the library
typedef HRESULT (*DebugCreateFunction)(REFIID, PVOID *);
DebugCreateFunction m_debugCreate;
};
struct CdbDebugEnginePrivate
{
explicit CdbDebugEnginePrivate(DebuggerManager *parent, CdbDebugEngine* engine);
explicit CdbDebugEnginePrivate(const DebuggerEngineLibrary &lib, DebuggerManager *parent, CdbDebugEngine* engine);
~CdbDebugEnginePrivate();
bool isDebuggeeRunning() const { return m_watchTimer != -1; }
@@ -80,3 +98,4 @@ enum { debugCDB = 0 };
} // namespace Debugger
#endif // DEBUGGER_CDBENGINEPRIVATE_H