From: James Harper Date: Sat, 27 Mar 2010 07:38:19 +0000 (+0100) Subject: Add bVarVssDllHandle so that a plugin can get GetProcAddress X-Git-Tag: Release-5.2.1~1570 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=91931ee8b55a747406ab22e532933cab2e5e41d2;p=bacula%2Fbacula Add bVarVssDllHandle so that a plugin can get GetProcAddress --- diff --git a/bacula/src/filed/fd_plugins.c b/bacula/src/filed/fd_plugins.c index 5407a146cc..ad782004fe 100644 --- a/bacula/src/filed/fd_plugins.c +++ b/bacula/src/filed/fd_plugins.c @@ -915,6 +915,14 @@ static bRC baculaGetValue(bpContext *ctx, bVariable var, void *value) *(void **)value = g_pVSSClient->GetVssObject(); break; } +#endif + return bRC_Error; + case bVarVssDllHandle: +#ifdef HAVE_WIN32 + if (g_pVSSClient) { + *(void **)value = g_pVSSClient->GetVssDllHandle(); + break; + } #endif return bRC_Error; } diff --git a/bacula/src/filed/fd_plugins.h b/bacula/src/filed/fd_plugins.h index 2f6ac15b29..39f64558a0 100644 --- a/bacula/src/filed/fd_plugins.h +++ b/bacula/src/filed/fd_plugins.h @@ -150,7 +150,8 @@ typedef enum { bVarSinceTime = 8, bVarAccurate = 9, bVarFileSeen = 10, - bVarVssObject = 11 + bVarVssObject = 11, + bVarVssDllHandle = 12, } bVariable; /* Events that are passed to plugin */ diff --git a/bacula/src/win32/filed/vss.h b/bacula/src/win32/filed/vss.h index 9a0192eae5..5b2b355a96 100644 --- a/bacula/src/win32/filed/vss.h +++ b/bacula/src/win32/filed/vss.h @@ -69,6 +69,7 @@ public: void DestroyWriterInfo(); void AppendWriterInfo(int nState, const char* pszInfo); const bool IsInitialized() { return m_bBackupIsInitialized; }; + HMODULE GetVssDllHandle() { return m_hLib; }; IUnknown *GetVssObject() { return m_pVssObject; }; private: