summaryrefslogtreecommitdiff
path: root/library/ShadowCopy/shadow.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:00:50 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:00:50 +0200
commit4ecfd41e36533d858c98d051ef70cab80e69e972 (patch)
treeca07d8745967d2c6a7123a5d32269cfbfaa7bd6c /library/ShadowCopy/shadow.cpp
parent2.2 (diff)
downloadFreeFileSync-4ecfd41e36533d858c98d051ef70cab80e69e972.tar.gz
FreeFileSync-4ecfd41e36533d858c98d051ef70cab80e69e972.tar.bz2
FreeFileSync-4ecfd41e36533d858c98d051ef70cab80e69e972.zip
2.3
Diffstat (limited to 'library/ShadowCopy/shadow.cpp')
-rw-r--r--library/ShadowCopy/shadow.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/library/ShadowCopy/shadow.cpp b/library/ShadowCopy/shadow.cpp
index e10a4eb8..edc62e8b 100644
--- a/library/ShadowCopy/shadow.cpp
+++ b/library/ShadowCopy/shadow.cpp
@@ -82,6 +82,9 @@ bool shadow::createShadowCopy(const wchar_t* volumeName,
//wait for shadow copy writers to complete
hr = pWriteMetaData->Wait();
+ if (SUCCEEDED(hr))
+ pWriteMetaData->QueryStatus(&hr, NULL); //check if the async operation succeeded...
+
pWriteMetaData->Release();
if (FAILED(hr))
{
@@ -126,6 +129,9 @@ bool shadow::createShadowCopy(const wchar_t* volumeName,
}
hr = pPrepare->Wait();
+ if (SUCCEEDED(hr))
+ pPrepare->QueryStatus(&hr, NULL); //check if the async operation succeeded...
+
pPrepare->Release();
if (FAILED(hr))
{
@@ -144,7 +150,10 @@ bool shadow::createShadowCopy(const wchar_t* volumeName,
}
hr = pDoShadowCopy->Wait();
- pDoShadowCopy->Release();
+ if (SUCCEEDED(hr))
+ pDoShadowCopy->QueryStatus(&hr, NULL); //check if the async operation succeeded...
+
+ pDoShadowCopy->Release();
if (FAILED(hr))
{
releaseShadowCopy(pBackupComponents);
bgstack15