本文整理汇总了C++中atl::CComPtr::GetBindInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ CComPtr::GetBindInfo方法的具体用法?C++ CComPtr::GetBindInfo怎么用?C++ CComPtr::GetBindInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类atl::CComPtr
的用法示例。
在下文中一共展示了CComPtr::GetBindInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsFlashRequest
// This is the heuristic which detects the requests issued by Flash.ocx.
// It turned out that the implementation from ''Flash.ocx'' (tested version is 15.0.0.152)
// returns quite minimal configuration in comparison with the implementation from Microsofts'
// libraries (see grfBINDF and bindInfo.dwOptions). The impl from MS often includes something
// else.
bool WBPassthruSink::IsFlashRequest(const wchar_t* const* additionalHeaders)
{
if (additionalHeaders && *additionalHeaders)
{
auto flashVersionHeader = ExtractHttpHeader<std::wstring>(*additionalHeaders, L"x-flash-version:", L"\n");
if (!TrimString(flashVersionHeader).empty())
{
return true;
}
}
ATL::CComPtr<IBindStatusCallback> bscb;
if (SUCCEEDED(QueryServiceFromClient(&bscb)) && !!bscb)
{
DWORD grfBINDF = 0;
BINDINFO bindInfo = {};
bindInfo.cbSize = sizeof(bindInfo);
if (SUCCEEDED(bscb->GetBindInfo(&grfBINDF, &bindInfo)) &&
(BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE| BINDF_PULLDATA) == grfBINDF &&
(BINDINFO_OPTIONS_ENABLE_UTF8 | BINDINFO_OPTIONS_USE_IE_ENCODING) == bindInfo.dwOptions
)
{
return true;
}
}
return false;
}