是什么导致 pMoniker->BindToObject 返回 800700c1
What's causing pMoniker->BindToObject to return 800700c1
捕获设备有效,但绑定失败。800703E8通常表示未注册的过滤器。win10 - 64
if (SUCCEEDED(hr))
{
char tempDevicePathUTF8[256];
memset(tempDevicePathUTF8,0,256);
tempDevicePathUTF8[0] = 0;
WideCharToMultiByte(CP_UTF8, 0, varName.bstrVal, -1,
tempDevicePathUTF8,
sizeof(tempDevicePathUTF8), NULL,
NULL);
if (strncmp(tempDevicePathUTF8,
(const char*) deviceUniqueIdUTF8,
deviceUniqueIdUTF8Length) == 0)
{
// We have found the requested device
deviceFound = true;
hr = pM->BindToObject(0, 0, IID_IBaseFilter,
(void**) &captureFilter);
if FAILED(hr)
{
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture,
_id, "Failed to bind to the selected capture device %d",hr);
}
if (productUniqueIdUTF8
&& productUniqueIdUTF8Length > 0) // Get the device name
{
GetProductId(deviceUniqueIdUTF8,
productUniqueIdUTF8,
productUniqueIdUTF8Length);
}
}
}
这是webtc中常见的捕获步骤,可以在大多数计算机上运行良好,但这个特定的
0x800700C1
是ERROR_BAD_EXE_FORMAT
,这表明捕获设备有问题(即使您认为它是有效的)。一个典型的问题是设备正确地注册了32位应用程序,但没有注册64位应用程序(反之亦然)。无论哪种方式,这都是特定DirectShow过滤器的COM注册问题。
相关文章:
- 来自 std::list 的迭代器 .end() 按预期返回"0xcdcdcdcdcdcdcdcd"但 .begin()
- 什么时候在C++中返回常量引用是个好主意
- 你能重载对象变量名本身返回的内容吗
- 为什么 Serial.println(<char[]>);返回随机字符?
- C++映射:具有自定义类的运算符[]不起作用(总是返回0)
- 如何获取std::result_of函数的返回类型
- QueryWorkingSet总是返回false
- (C++)分析树以计算返回错误值的简单算术表达式
- 访问者访问变体并返回不同类型时出错
- 如何返回一个类的两个对象相加的结果
- OpenInventor从9.8升级到10.4.2后,GLSL纹理返回零
- lower_bound()返回最后一个元素
- "throw expression code" 1e7 >返回 d 是什么?投掷标准::overflow_error( "too big" ) : d;意味 着?
- 奇怪的(对我来说)返回声明 - 在谷歌上找不到任何关于它的信息
- 如何取消对nullptr的屏蔽,返回正确的对象
- 奇怪的结构&GCC&clang(void*返回类型)
- 架构决策:返回std::future还是提供回调
- 从python中调用C++函数并获取返回值
- DirectShow BindToObject返回无效句柄
- 是什么导致 pMoniker->BindToObject 返回 800700c1