views:

51

answers:

1

It's a real strange issue, the machine information below is from DXDiag. There is no error reported, but create CLSID_CaptureGraphBuilder2 instance always failed in the machine. It's okay to create CLSID_FilterGraph. Before create CLSID_CaptureGraphBuilder2, I have called CoInitialize and created CLSID_FilterGraph. Only this machine has the error, what dll related with this interface or any function needed to call before to make it work? Thanks in advance.


System Information

Time of this report: 4/24/2010, 09:46:58 Machine name: TURION Operating System: Windows XP Home Edition (5.1, Build 2600) Service Pack 3 (2600.xpsp_sp3_qfe.100216-1510) Language: Japanese (Regional Setting: Japanese) System Manufacturer: To Be Filled By O.E.M. System Model: MS-7145 BIOS: Default System BIOS Processor: AMD Turion(tm) 64 Mobile Technology MT-30, MMX, 3DNow, ~1.6GHz Memory: 768MB RAM Page File: 376MB used, 1401MB available Windows Dir: C:\WINDOWS DirectX Version: DirectX 9.0c (4.09.0000.0904) DX Setup Parameters: Not found DxDiag Version: 5.03.2600.5512 32bit Unicode


DxDiag Notes

DirectX Files Tab: No problems found. Display Tab 1: No problems found. Sound Tab 1: No problems found. Sound Tab 2: No problems found. Music Tab: No problems found. Input Tab: No problems found. Network Tab: No problems found.

A: 

Don't call CoCreateInstance a CLSID_FilterGraph .. this is pointless. CoCreateInstance CLSID_CreateCaptureGraph2 and post up the code you use in CoCreateInstance and any HRESULT value you get returned.

The following code "should" work:

ICaptureGraphBuilder2* pCapture = NULL;
HRESULT hr = CoCreateInstance( CLSID_CaptureGraphBuilder, NULL, CLSCTX_INPROC_SERVER, IID_ICaptureGraphBuilder2, (void**) &pCapture) ;

If it doesn't look up the HRESULT returned in hr and tell us what it is (or look it up yourself).

Other than invalid parameters the only thing that ought to be able to fail you here is that the class isn't registered. If so then this is something fairly majorly amiss ... this ought not to be possible.

Goz
Thanks for your information, it doesn't work.
Yigang Wu
And what is the returned HRESULT? I hate to repeat myself but I have brought up the return 3 times nw ...
Goz