diff options
Diffstat (limited to 'lib/ShadowCopy/shadow.h')
-rw-r--r-- | lib/ShadowCopy/shadow.h | 35 |
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| ---------------*/ |