]> git.sur5r.net Git - bacula/bacula/commitdiff
Add bVarVssDllHandle so that a plugin can get GetProcAddress
authorJames Harper <james.harper@bendigoit.com.au>
Sat, 27 Mar 2010 07:38:19 +0000 (08:38 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:49:41 +0000 (16:49 +0200)
bacula/src/filed/fd_plugins.c
bacula/src/filed/fd_plugins.h
bacula/src/win32/filed/vss.h

index 5407a146cc6f231eda590c996451f43bede3a030..ad782004fe88b70b4e1b0fa671bde876e73ed7f4 100644 (file)
@@ -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;
    }
index 2f6ac15b291134aceaff4100cfbe80f73adec9c2..39f64558a0b574bfdf5ab1b104855789649013cd 100644 (file)
@@ -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 */
index 9a0192eae5756b71e7480d92ff3b196691b33bd9..5b2b355a9697ed9e2e798b91dbdd7ebb1417bf92 100644 (file)
@@ -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: