summaryrefslogtreecommitdiff
path: root/library/ShadowCopy/shadow.cpp
diff options
context:
space:
mode:
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