我建立使用Visual Studio 2010在Windows Server 2008上,应用程序是使用directshownet直接显示在.NET包装器访问系统的Web摄像头让视频流中的C#应用程序,但应用程序产生这个错误
I am building an application in C# using visual studio 2010 on windows server 2008, the application is to use directshownet the wrapper of direct show to access the system's web camera to get the video stream but the application is generating this error
Retrieving the COM class factory for component with CLSID {C1F400A0-3F08-11D3-9F0B-006008039E37} failed due to the following error: 80040154.
源$ C $ C低于
the source code is below
public Capture(int iDeviceNum, int iWidth, int iHeight, short iBPP, Control hControl) { DsDevice[] capDevices; // Get the collection of video devices capDevices = DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice); if (iDeviceNum + 1 > capDevices.Length) { throw new Exception("No video capture devices found at that index!"); } try { // Set up the capture graph SetupGraph(capDevices[iDeviceNum], iWidth, iHeight, iBPP); //// tell the callback to ignore new images m_PictureReady = new ManualResetEvent(false); } catch { Dispose(); throw; } }
在code抛出时,它到达此行的错误
the code throws the error whenever it reaches this line
SetupGraph(capDevices[iDeviceNum], iWidth, iHeight, iBPP);请人帮助我,我用Google搜索,但无法找到一个解决方案。
please people help me out, I have googled it but couldnt find a solution
推荐答案这GUID是一个捕获设备的名称的样品采集卡。它是在SDK头名为qedit.h宣布,文档的在这里。注意去precation警告,qedit.h是Windows SDK的不再是一部分,我没有它在我的Windows 7机器上安装。
That guid is associated with a capture device with the name "Sample Grabber". It is declared in an SDK header named qedit.h, docs are here. Note the deprecation warning, qedit.h is no longer part of the Windows SDK and I don't have it installed on my Windows 7 machine.
这听起来像你有注册表损坏,可能引起由Windows升级的一个轻微的情况。与样品采集卡过滤器仍然入伍的设备,但实际的过滤器不再注册。不知道如何解决这个问题的损害,请在superuser。这类事故都是然而,可能出现的用户的计算机上也是如此。不要捕获异常,并继续寻找其他可用的捕获设备。
It sounds like you have a slight case of registry corruption, possibly induced by a Windows upgrade. With the Sample Grabber filter still enlisted as a device but the actual filter no longer registered. No idea how to fix this damage, ask at superuser. These kind of mishaps are however likely to occur on your user's machine as well. Do catch the exception and continue looking for another available capture device.
更多推荐
检索COM类工厂具有CLSID组件{C1F400A0
发布评论