"Class not registered" problem

[b][red]This message was edited by John_Zhou at 2006-6-29 7:35:43[/red][/b][hr]
Hi All,

I am trying a sample code to playback a AVI file on PDA. The code is written with Directshow. When I debug it, I found the return value is "-2147221164 :Class not registered" for a HRESULT variable. The portion code is as follows:

#include
#include
#include
#include

IGraphBuilder *pGraph = NULL;
IMediaControl *pMediaControl= NULL;
IMediaEventEx *pEvent= NULL;
........................................

HRESULT hr=1;
CoInitialize(NULL);
hr=CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC , IID_IGraphBuilder, (void **)&pGraph);

pGraph->RenderFile(L"\20051215130000_01.avi", NULL);

..........................


The problem is that the hr returened is -2147221164 (instead of S_OK). Therefore the pGraph is not assigned.

Please give me some ideas to solve the problem.

Thank you very much!

John Zhou



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories