summaryrefslogtreecommitdiff
path: root/lib/ShadowCopy/shadow.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
commitc8e0e909b4a8d18319fc65434a10dc446434817c (patch)
treeeee91e7d2ce229dd043811eae8f1e2bd78061916 /lib/ShadowCopy/shadow.h
parent5.2 (diff)
downloadFreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.gz
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.bz2
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.zip
5.3
Diffstat (limited to 'lib/ShadowCopy/shadow.h')
-rw-r--r--lib/ShadowCopy/shadow.h35
1 files changed, 14 insertions, 21 deletions
diff --git a/lib/ShadowCopy/shadow.h b/lib/ShadowCopy/shadow.h
index ea113dae..66d29300 100644
--- a/lib/ShadowCopy/shadow.h
+++ b/lib/ShadowCopy/shadow.h
@@ -31,44 +31,37 @@ typedef ShadowData* ShadowHandle;
//volumeName *must* end with "\"
SHADOWDLL_API
-ShadowHandle createShadowCopy(const wchar_t* volumeName, // in Returns nullptr on failure!
- wchar_t* errorMessage, // out
- unsigned int errorBufferLen); // in
+ShadowHandle createShadowCopy(const wchar_t* volumeName); //returns nullptr on failure!
-//don't forget to release the backupHandle after shadow copy is not needed anymore!
+//release the backupHandle after shadow copy is not needed anymore!
SHADOWDLL_API
void releaseShadowCopy(ShadowHandle handle);
SHADOWDLL_API
-void getShadowVolume(ShadowHandle handle, //shadowVolName does *not* end with "\"
- wchar_t* buffer,
- unsigned int bufferLen);
+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
+const wchar_t* getLastError(); //no nullptr check required!
//##########################################################################################
/*----------
|typedefs|
----------*/
-typedef ShadowHandle (*CreateShadowCopyFct)(const wchar_t* volumeName,
- wchar_t* errorMessage,
- unsigned int errorBufferLen);
-
-typedef void (*ReleaseShadowCopyFct)(ShadowHandle handle);
-
-typedef void (*GetShadowVolumeFct)(ShadowHandle handle,
- wchar_t* buffer,
- unsigned int bufferLen);
-
+typedef ShadowHandle (*FunType_createShadowCopy )(const wchar_t* volumeName);
+typedef void (*FunType_releaseShadowCopy)(ShadowHandle handle);
+typedef const wchar_t* (*FunType_getShadowVolume )(ShadowHandle handle);
+typedef const wchar_t* (*FunType_getLastError)();
/*--------------
|symbol names|
--------------*/
//(use const pointers to ensure internal linkage)
-const char createShadowCopyFctName [] = "createShadowCopy";
-const char releaseShadowCopyFctName[] = "releaseShadowCopy";
-const char getShadowVolumeFctName [] = "getShadowVolume";
-
+const char funName_createShadowCopy [] = "createShadowCopy";
+const char funName_releaseShadowCopy[] = "releaseShadowCopy";
+const char funName_getShadowVolume [] = "getShadowVolume";
+const char funName_getLastError [] = "getLastError";
/*---------------
|library names|
---------------*/
bgstack15