【问题标题】:What's causing pMoniker->BindToObject to return 800700c1是什么导致 pMoniker->BindToObject 返回 800700c1
【发布时间】:2017-02-17 02:35:32
【问题描述】:

捕获设备有效,但绑定失败。 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);
                    }

                }
            }

这是 webrtc 中常见的捕获步骤,可以在大多数计算机上运行良好,但这个特定的不能。

【问题讨论】:

    标签: c++ winapi com directshow


    【解决方案1】:

    0x800700C1ERROR_BAD_EXE_FORMAT,表示捕获设备有问题(即使您认为它是有效的)。典型问题之一是设备正确注册了 32 位应用程序,但没有正确注册 64 位应用程序(反之亦然)。无论哪种方式,都是特定 DirectShow 过滤器的 COM 注册问题。

    【讨论】:

      猜你喜欢
      • 2011-05-17
      • 1970-01-01
      • 2012-10-16
      • 2011-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-22
      相关资源
      最近更新 更多