summaryrefslogtreecommitdiff
path: root/shared/shadow.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:07:15 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:07:15 +0200
commit8318453bf9d4fd50b137ff6c6fc8d1fd22aa6395 (patch)
tree975c6e590c31e56007006a23e7b15d0245d75b08 /shared/shadow.cpp
parent3.6 (diff)
downloadFreeFileSync-8318453bf9d4fd50b137ff6c6fc8d1fd22aa6395.tar.gz
FreeFileSync-8318453bf9d4fd50b137ff6c6fc8d1fd22aa6395.tar.bz2
FreeFileSync-8318453bf9d4fd50b137ff6c6fc8d1fd22aa6395.zip
3.7
Diffstat (limited to 'shared/shadow.cpp')
-rw-r--r--shared/shadow.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/shared/shadow.cpp b/shared/shadow.cpp
index be0f7c85..81f19d20 100644
--- a/shared/shadow.cpp
+++ b/shared/shadow.cpp
@@ -12,6 +12,7 @@
#include <stdexcept>
#include "staticAssert.h"
#include "buildInfo.h"
+#include "ShadowCopy\shadow.h"
using FreeFileSync::ShadowCopy;
@@ -86,9 +87,10 @@ ShadowCopy::~ShadowCopy()
{
if (backupHandle != NULL)
{
- typedef void (*ReleaseShadowCopyFct)(void* backupHandle);
+ using namespace Shadow;
+
static const ReleaseShadowCopyFct releaseShadowCopy =
- Utility::loadDllFunction<ReleaseShadowCopyFct>(getShadowDllName().c_str(), "releaseShadowCopy");
+ Utility::loadDllFunction<ReleaseShadowCopyFct>(getShadowDllName().c_str(), releaseShadowCopyFctName);
if (releaseShadowCopy == NULL)
throw std::logic_error("Could not load \"releaseShadowCopy\"!"); //shouldn't arrive here!
@@ -100,22 +102,13 @@ ShadowCopy::~ShadowCopy()
Zstring ShadowCopy::makeShadowCopy(const Zstring& inputFile)
{
- typedef bool (*CreateShadowCopyFct)( //volumeName must end with "\", while shadowVolName does not end with "\"
- const wchar_t* volumeName,
- wchar_t* shadowVolName,
- unsigned int shadowBufferLen,
- void** backupHandle,
- wchar_t* errorMessage,
- unsigned int errorBufferLen);
- static const CreateShadowCopyFct createShadowCopy =
- Utility::loadDllFunction<CreateShadowCopyFct>(getShadowDllName().c_str(), "createShadowCopy");
+ using namespace Shadow;
+ static const CreateShadowCopyFct createShadowCopy =
+ Utility::loadDllFunction<CreateShadowCopyFct>(getShadowDllName().c_str(), createShadowCopyFctName);
- typedef void (*ReleaseShadowCopyFct)(void* backupHandle);
static const ReleaseShadowCopyFct releaseShadowCopy =
- Utility::loadDllFunction<ReleaseShadowCopyFct>(getShadowDllName().c_str(), "releaseShadowCopy");
-
-
+ Utility::loadDllFunction<ReleaseShadowCopyFct>(getShadowDllName().c_str(), releaseShadowCopyFctName);
//check if shadow copy dll was loaded correctly
if ( createShadowCopy == NULL ||
bgstack15