0

I am following this article to create a snapshot using Windows VSS service and further taking it a step ahead by mounting it.

After searching I found a method ExposeSnapshot()to which I passed the required parameter as below

result = pBackup->ExposeSnapshot(snapshotProp.m_SnapshotId, NULL, VSS_VOLSNAP_ATTR_EXPOSED_LOCALLY, L"C:\\Mount\\", &pwszExposed);

Also I set the context to result = pBackup->SetContext(VSS_CTX_APP_ROLLBACK | VSS_CTX_BACKUP); as only persistent shadow copies can be mounted locally still t have the same HRESULT = 0x80070057 which reads as One or more arguments are invalid

What's the possible error here ?

PS: I have used L"C:\\Mount\\ as well as L"C:\Mount\\ but both does not seem to work

CMouse
  • 130
  • 3
  • 19
  • I tried it but the result is same @HansPassant – CMouse Jun 08 '17 at 15:26
  • While debugging I found that the variable `pwszExposed` is not getting populated, ofcourse because the method is failing. I refered https://github.com/uri247/Win81Desktop/blob/master/VShadow%20Volume%20Shadow%20Copy%20Service%20sample/C%2B%2B/expose.cpp but it is using the method in same way as I am using. – CMouse Jun 09 '17 at 06:50
  • Okay, It seems that there was some problem with the directory. It's working now I used the path as `L"C:\\Mount"` – CMouse Jun 09 '17 at 07:12

0 Answers0