From 91931ee8b55a747406ab22e532933cab2e5e41d2 Mon Sep 17 00:00:00 2001 From: James Harper Date: Sat, 27 Mar 2010 08:38:19 +0100 Subject: [PATCH] Add bVarVssDllHandle so that a plugin can get GetProcAddress --- bacula/src/filed/fd_plugins.c | 8 ++++++++ bacula/src/filed/fd_plugins.h | 3 ++- bacula/src/win32/filed/vss.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) 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: -- 2.39.5