summaryrefslogtreecommitdiff
path: root/lib/ShadowCopy
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:21:41 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:21:41 +0200
commitd6301fca6b78db52d0d98f8e0799aba175ad2e59 (patch)
tree0380aac034e0d70ee058db07900d80ff20cfc81e /lib/ShadowCopy
parent5.7 (diff)
downloadFreeFileSync-d6301fca6b78db52d0d98f8e0799aba175ad2e59.tar.gz
FreeFileSync-d6301fca6b78db52d0d98f8e0799aba175ad2e59.tar.bz2
FreeFileSync-d6301fca6b78db52d0d98f8e0799aba175ad2e59.zip
5.8
Diffstat (limited to 'lib/ShadowCopy')
-rw-r--r--lib/ShadowCopy/LockFile.cpp2
-rw-r--r--lib/ShadowCopy/dll_main.cpp2
-rw-r--r--lib/ShadowCopy/shadow.cpp4
-rw-r--r--lib/ShadowCopy/shadow.h22
4 files changed, 16 insertions, 14 deletions
diff --git a/lib/ShadowCopy/LockFile.cpp b/lib/ShadowCopy/LockFile.cpp
index 701b84ec..a09e7f94 100644
--- a/lib/ShadowCopy/LockFile.cpp
+++ b/lib/ShadowCopy/LockFile.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
diff --git a/lib/ShadowCopy/dll_main.cpp b/lib/ShadowCopy/dll_main.cpp
index 95d14910..4665154a 100644
--- a/lib/ShadowCopy/dll_main.cpp
+++ b/lib/ShadowCopy/dll_main.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
diff --git a/lib/ShadowCopy/shadow.cpp b/lib/ShadowCopy/shadow.cpp
index 3bc2df87..93026039 100644
--- a/lib/ShadowCopy/shadow.cpp
+++ b/lib/ShadowCopy/shadow.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "shadow.h"
@@ -152,7 +152,7 @@ shadow::ShadowHandle shadow::createShadowCopy(const wchar_t* volumeName)
try
{
ShadowData result = ::createShadowCopy(volumeName); //shadow handle owned by caller! throw ComError
- return new ShadowData(result);
+ return new ShadowData(result); //std::bad_alloc?
}
catch (const zen::ComError& e)
{
diff --git a/lib/ShadowCopy/shadow.h b/lib/ShadowCopy/shadow.h
index 8f35c728..e68b2655 100644
--- a/lib/ShadowCopy/shadow.h
+++ b/lib/ShadowCopy/shadow.h
@@ -1,16 +1,16 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
-#ifndef SHADOWCOPY_H
-#define SHADOWCOPY_H
+#ifndef SHADOWCOPY_H_14837413434
+#define SHADOWCOPY_H_14837413434
#ifdef SHADOWDLL_EXPORTS
-#define SHADOWDLL_API extern "C" __declspec(dllexport)
+#define DLL_FUNCTION_DECLARATION extern "C" __declspec(dllexport)
#else
-#define SHADOWDLL_API extern "C" __declspec(dllimport)
+#define DLL_FUNCTION_DECLARATION extern "C" __declspec(dllimport)
#endif
#include <zen/build_info.h>
@@ -30,18 +30,18 @@ struct ShadowData;
typedef ShadowData* ShadowHandle;
//volumeName *must* end with "\"
-SHADOWDLL_API
+DLL_FUNCTION_DECLARATION
ShadowHandle createShadowCopy(const wchar_t* volumeName); //returns nullptr on failure!
//release the backupHandle after shadow copy is not needed anymore!
-SHADOWDLL_API
+DLL_FUNCTION_DECLARATION
void releaseShadowCopy(ShadowHandle handle);
-SHADOWDLL_API
+DLL_FUNCTION_DECLARATION
const wchar_t* getShadowVolume(ShadowHandle handle); //never fails, returns shadowVolName, never ending with "\"
//get last error message if any of the functions above fail
-SHADOWDLL_API
+DLL_FUNCTION_DECLARATION
const wchar_t* getLastError(); //no nullptr check required!
//##########################################################################################
@@ -89,4 +89,6 @@ const wchar_t* getDllName()
}
}
-#endif //SHADOWCOPY_H
+#undef DLL_FUNCTION_DECLARATION
+
+#endif //SHADOWCOPY_H_14837413434
bgstack15