candera / hobocopy

An open source backup tool for Windows
http://candera.github.com/hobocopy/
MIT License
176 stars 52 forks source link

ExposeLocally failed with COM error #15

Closed aczire closed 13 years ago

aczire commented 13 years ago

tried to expose the snapshot, and it faild with Internal error 0×80070057, The parameter is incorrect. Any help?
for (unsigned int iFilter = 0; iFilter < filters.size(); ++iFilter)
{
delete filters[iFilter];
}
OutputWriter::WriteLine(TEXT("Exposing Snapshot"));
PWSTR wszExposed;
CHECK_HRESULT(pBackupComponents->ExposeSnapshot( snapshotId, NULL, VSS_VOLSNAP_ATTR_EXPOSED_LOCALLY, L"N:\"", &wszExposed));
fileCount = copyAction.get_FileCount();

aczire commented 13 years ago

Resolved.

    OutputWriter::WriteLine(TEXT("Calling InitializeForBackup")); 
    CHECK_HRESULT(pBackupComponents->InitializeForBackup()); 

    //Try to set the context so that we could see it as a persistent snapshot for Exposing it.
    CHECK_HRESULT(pBackupComponents->SetContext(VSS_CTX_APP_ROLLBACK | VSS_CTX_BACKUP));

. . OutputWriter::WriteLine(TEXT("Exposing Snapshot"));

        PWSTR wszExposed;

        CHECK_HRESULT(pBackupComponents->ExposeSnapshot( snapshotId, NULL, VSS_VOLSNAP_ATTR_EXPOSED_LOCALLY, L"N:", &wszExposed));
candera commented 13 years ago

Glad you resolved it, but this isn't technically a hobocopy issue. Happy to help with stuff like this over on the mailing list, though.