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

StackOverflow https://stackoverflow.com/questions/2123655

  •  22-09-2019
  •  | 
  •  

Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top