Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Direct Show doesn' t initialize. Collapse All
Subject Author Date
jihad bayssary Nov 3, 2008 - 2:11 AM

Before purchasing Prof-UIS I was writing a program using the normal MFC.

I have included tv’s that uses directshow to run.

Everything was running perfect until i replaced the old project with the new Prof-UIS one.

The whole prgram is running well unless the tv’s.

Direct show can’t initialize some smart pointers.

Here is the code:

CComPtr<IGraphBuilder>  g_pGB;

    /*creating the filter graph*/

    if (FAILED(g_pGB.CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC)))

        return false;

Any Idea why???

Thank you.

Technical Support Nov 3, 2008 - 6:56 AM

First if all, please ensure you didn’t forget to initialize COM/OLE after porting your application to Prof-UIS. Invoking of ::AfxOleInit(); from the InitInstance() virtual method of CWinAPP-derived class in your project should resolve the problem. If this does not help, just send us some small test project demonstrating this problem so we can clarify what’s wrong.

jihad bayssary Nov 7, 2008 - 1:20 AM

Thank you and sorry for the late reply,

I figured out right after i sent the question that i haven’t called the coinitialize function.

Thank you for your help.