本文整理汇总了C++中COptions::get_SkipDenied方法的典型用法代码示例。如果您正苦于以下问题:C++ COptions::get_SkipDenied方法的具体用法?C++ COptions::get_SkipDenied怎么用?C++ COptions::get_SkipDenied使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COptions
的用法示例。
在下文中一共展示了COptions::get_SkipDenied方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: startBackup
//.........这里部分代码省略.........
OutputWriter::WriteLine(TEXT("Call to DoSnapshotSet finished."));
OutputWriter::WriteLine(TEXT("Calling GetSnapshotProperties"));
VSS_SNAPSHOT_PROP snapshotProperties;
CHECK_HRESULT(pBackupComponents->GetSnapshotProperties(snapshotId, &snapshotProperties));
OutputWriter::WriteLine(TEXT("Calling CalculateSourcePath"));
// TODO: We'll eventually have to deal with mount points
CString wszSource;
CalculateSourcePath(
snapshotProperties.m_pwszSnapshotDeviceObject,
options.get_Source(),
wszVolumePathName,
wszSource
);
message.Empty();
message.AppendFormat(TEXT("Recursively creating destination directory %s."),
options.get_Destination());
OutputWriter::WriteLine(message);
Utilities::CreateDirectory(options.get_Destination());
OutputWriter::WriteLine(TEXT("Calling CopyRecursive"));
vector<CCopyFilter*> filters;
if (options.get_BackupType() == VSS_BT_FULL)
{
filters.push_back(new CIncludeAllCopyFilter());
}
else if (options.get_BackupType() == VSS_BT_INCREMENTAL)
{
filters.push_back(new CModifiedSinceCopyFilter(lastBackupTime, options.get_SkipDenied()));
}
filters.push_back(new CFilespecCopyFilter(options.get_Filespecs()));
CCopyAction copyAction(wszSource, options.get_Destination(), options.get_SkipDenied(), filters);
ProcessDirectory(wszSource, copyAction, TEXT(""), options.get_Recursive(), options.get_IgnorePattern());
for (unsigned int iFilter = 0; iFilter < filters.size(); ++iFilter)
{
delete filters[iFilter];
}
fileCount = copyAction.get_FileCount();
directoryCount = copyAction.get_DirectoryCount();
skipCount = copyAction.get_SkipCount();
byteCount = copyAction.get_ByteCount();
OutputWriter::WriteLine(TEXT("Calling BackupComplete"));
CComPtr<IVssAsync> pBackupCompleteResults;
CHECK_HRESULT(pBackupComponents->BackupComplete(&pBackupCompleteResults));
OutputWriter::WriteLine(TEXT("Waiting for call to BackupComplete to finish..."));
CHECK_HRESULT(pBackupCompleteResults->Wait());
HRESULT hrBackupCompleteResults;
CHECK_HRESULT(pBackupCompleteResults->QueryStatus(&hrBackupCompleteResults, NULL));
if (hrBackupCompleteResults != VSS_S_ASYNC_FINISHED)
{
throw new CVSSCopyException(TEXT("Completion of backup failed."));
}