本文整理汇总了C++中CMyComPtr::CopyTo方法的典型用法代码示例。如果您正苦于以下问题:C++ CMyComPtr::CopyTo方法的具体用法?C++ CMyComPtr::CopyTo怎么用?C++ CMyComPtr::CopyTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMyComPtr
的用法示例。
在下文中一共展示了CMyComPtr::CopyTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessVirt
HRESULT CPanelCopyThread::ProcessVirt()
{
/*
CMyComPtr<IFolderSetReplaceAltStreamCharsMode> iReplace;
FolderOperations.QueryInterface(IID_IFolderSetReplaceAltStreamCharsMode, &iReplace);
if (iReplace)
{
RINOK(iReplace->SetReplaceAltStreamCharsMode(ReplaceAltStreamChars ? 1 : 0));
}
*/
if (options->testMode)
{
CMyComPtr<IArchiveFolder> archiveFolder;
FolderOperations.QueryInterface(IID_IArchiveFolder, &archiveFolder);
if (!archiveFolder)
return E_NOTIMPL;
CMyComPtr<IFolderArchiveExtractCallback> extractCallback2;
RINOK(ExtractCallback.QueryInterface(IID_IFolderArchiveExtractCallback, &extractCallback2));
NExtract::NPathMode::EEnum pathMode =
NExtract::NPathMode::kCurPaths;
// NExtract::NPathMode::kFullPathnames;
Result = archiveFolder->Extract(&Indices.Front(), Indices.Size(),
BoolToInt(options->includeAltStreams),
BoolToInt(options->replaceAltStreamChars),
pathMode, NExtract::NOverwriteMode::kAsk,
options->folder, BoolToInt(true), extractCallback2);
}
else
Result = FolderOperations->CopyTo(
BoolToInt(options->moveMode),
&Indices.Front(), Indices.Size(),
BoolToInt(options->includeAltStreams),
BoolToInt(options->replaceAltStreamChars),
options->folder, ExtractCallback);
if (Result == S_OK && !ExtractCallbackSpec->ThereAreMessageErrors &&
(!options->hashMethods.IsEmpty() || options->testMode))
{
CProgressMessageBoxPair &pair = GetMessagePair(false); // GetMessagePair(ExtractCallbackSpec->Hash.NumErrors != 0);
AddHashBundleRes(pair.Message, Hash, FirstFilePath);
}
return Result;
}