if the code CComPtr<IGraphBuilder> gb;CComPtr<ICaptureGraphBuilder2> cgb2;
instead of IGraphBuilder* gb;ICaptureGraphBuilder2* cgb2;
the program run stop in the code if(FAILED(hr=cgb2->GetFiltergraph(&gb)))
and throw a dialog.
the information of dialog:
Debug Assertion Failed!
Program:f:\capt\capt.exe
File:d:\vs2008\vc\atlmfc\include\altcomcli.h
Line: 149
Expression:p==0
For information on how your program can cause an assertion failure, see the
Visual C++ documentation on asserts.
(Press Retry to debug the application)
What's wrong with this program?How to correct?