本文整理汇总了C++中CMyComPtr::ReleaseOutStream方法的典型用法代码示例。如果您正苦于以下问题:C++ CMyComPtr::ReleaseOutStream方法的具体用法?C++ CMyComPtr::ReleaseOutStream怎么用?C++ CMyComPtr::ReleaseOutStream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMyComPtr
的用法示例。
在下文中一共展示了CMyComPtr::ReleaseOutStream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Code
HRESULT CDecoder::Code(const CHeader &header, ISequentialOutStream *outStream,
ICompressProgressInfo *progress)
{
if (header.FilterID > 1)
return E_NOTIMPL;
{
CMyComPtr<ICompressSetDecoderProperties2> setDecoderProperties;
_lzmaDecoder.QueryInterface(IID_ICompressSetDecoderProperties2, &setDecoderProperties);
if (!setDecoderProperties)
return E_NOTIMPL;
RINOK(setDecoderProperties->SetDecoderProperties2(header.LzmaProps, 5));
}
CMyComPtr<ICompressSetOutStream> setOutStream;
bool filteredMode = (header.FilterID == 1);
if (filteredMode)
{
_bcjStream.QueryInterface(IID_ICompressSetOutStream, &setOutStream);
if (!setOutStream)
return E_NOTIMPL;
RINOK(setOutStream->SetOutStream(outStream));
outStream = _bcjStream;
}
const UInt64 *Size = header.HasSize() ? &header.Size : NULL;
HRESULT res = _lzmaDecoderSpec->CodeResume(outStream, Size, progress);
if (filteredMode)
{
CMyComPtr<IOutStreamFlush> flush;
_bcjStream.QueryInterface(IID_IOutStreamFlush, &flush);
if (flush)
{
HRESULT res2 = flush->Flush();
if (res == S_OK)
res = res2;
}
HRESULT res2 = setOutStream->ReleaseOutStream();
if (res == S_OK)
res = res2;
}
RINOK(res);
if (header.HasSize())
if (_lzmaDecoderSpec->GetOutputProcessedSize() != header.Size)
return S_FALSE;
return S_OK;
}