Retrieving the COM class factory for component with CLSID {…} failed due to the following error: 80040154

早过忘川 提交于 2019-12-11 08:54:04

问题


I am using DirectShowLib and SampleGrabber to capture video frames of an AVI file. I am accomplishing this by using graph builder and couple of filters. Everything was working fine, I was able to initialize graph and filters.

I then added code to get some video information like Dimension, Frame rate e.t.c. For this I used to IMediaDet. But when I try to initialize it:

Type t = Type.GetTypeFromCLSID(new Guid("65BD0710-24D2-4ff7-9324-ED2E5D3ABAFA"));
IMediaDet mediaDet = (IMediaDet)Activator.CreateInstance(t);

The Activator.CreateInstance(t) throw an exception:

Retrieving the COM class factory for component with CLSID {65BD0710-24D2-4FF7-9324-ED2E5D3ABAFA} failed due to the following error: 80040154.

I don't think its the problem with the build as the filters and graph builder are initializing fine. Any one has any idea, or is there any other API I can use to gather AVI file information like Dimensions, Frame rate, Video Length?


回答1:


I think you mistyped the Guid. It is close to one supported by qedit.dll, 65BD0711-24D2-4FF7-9324-ED2E5D3ABAFA, you're off by one digit.




回答2:


0x80040154 - is Class Not Registered - usually that means one of two things - the CLSID is wrong, or the DLL/EXE that implements that class is not (properly) registered on the machine.

You can check the registry under HKCR/CLSID to see if that is actually registered on the machine.



来源:https://stackoverflow.com/questions/2123655/retrieving-the-com-class-factory-for-component-with-clsid-failed-due-to-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!