Click here to Skip to main content
15,915,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Tree Control and CDocument Pin
Azadeh18-Nov-02 21:30
Azadeh18-Nov-02 21:30 
GeneralRe: Tree Control and CDocument Pin
Neville Franks19-Nov-02 0:03
Neville Franks19-Nov-02 0:03 
GeneralRe: Tree Control and CDocument Pin
Azadeh28-Nov-02 7:18
Azadeh28-Nov-02 7:18 
GeneralProblem in TabControl Pin
Nirav Doshi16-Nov-02 4:15
Nirav Doshi16-Nov-02 4:15 
GeneralRe: Problem in TabControl Pin
NormDroid16-Nov-02 7:12
professionalNormDroid16-Nov-02 7:12 
GeneralRe: Problem in TabControl Pin
Nirav Doshi16-Nov-02 7:40
Nirav Doshi16-Nov-02 7:40 
GeneralRe: Problem in TabControl Pin
Joan M17-Nov-02 8:13
professionalJoan M17-Nov-02 8:13 
QuestionIs there something wrong with my DirectX SDK? Pin
Redeemer-dk16-Nov-02 3:53
Redeemer-dk16-Nov-02 3:53 
When i try to use the RenderFile function on an IGraphBuilder i get a ton of errors. I've also tried downloading a sample file that is guaranteed to work, but i still get the errors. Here's the code from the sample:
#include <windows.h>
#include <objbase.h>
#include <dShow.h>

int APIENTRY WinMain(HINSTANCE hInstance,  HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
	HRESULT			hr;
	IGraphBuilder*	pGraphBuilder;
	IMediaControl*	pMediaControl;
	WCHAR			MediaFile[MAX_PATH];

	CoInitialize(NULL);
	
	hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_ALL, IID_IGraphBuilder, (void**)&pGraphBuilder);
	if (FAILED(hr))
		return -1;

	MultiByteToWideChar(CP_ACP, 0, lpCmdLine, -1, MediaFile, MAX_PATH);
	hr = pGraphBuilder->RenderFile(MediaFile, NULL);
	if (FAILED(hr))
		return -2;

	hr = pGraphBuilder->QueryInterface(IID_IMediaControl, (void**)&pMediaControl);
	if (FAILED(hr))
		return -3;

	hr = pMediaControl->Run();
	if (FAILED(hr))
		return -4;

	Sleep(10000);

	pMediaControl->Stop();
	pMediaControl->Release();
	pGraphBuilder->Release();

	CoUninitialize();

	return 0;
}


I set up VS .NET so the commandline contains a valid media file. When it performs the RenderFile function it loads in a sec or so and comes with a bunch of erros like these:
ASSERT failed.
g_cFGObjects == 0
At line 6002 d:\xpclient\multimedia\dshow\filters\core\filgraph\filgraph\filgraph.cpp
Continue? (Cancel to debug)

ASSERT failed.
Executable: DShowTut1.exe Pid 720 Tid 2cc. Module quartz.dll, 26 objects left active!
At line 317 of d:\xpclient\multimedia\published\dxmdev\dshowdev\base\dllentry.cpp
Continue? (Cancel to debug)

sometimes it also pops up with additional erros like:
m_dwRecursionCount == 0 && m_dwOwnerThreadId == 0
At line 58 of d:\xpclient\multimedia\dshow\filters\core\filgraph\filgraph\msgmutex.cpp
Continue? (Cancel to Debug)


And then exits. Anyone know what could be wrong?

Thanks all!

-Rune Svendsen
Generalcreating help files Pin
jack lowe16-Nov-02 3:11
sussjack lowe16-Nov-02 3:11 
GeneralRe: creating help files Pin
Paul M Watt16-Nov-02 7:49
mentorPaul M Watt16-Nov-02 7:49 
Questionhow to work with sln and vcproj files Pin
Anonymous16-Nov-02 3:03
Anonymous16-Nov-02 3:03 
AnswerRe: how to work with sln and vcproj files Pin
lbc16-Nov-02 4:08
lbc16-Nov-02 4:08 
AnswerRe: how to work with sln and vcproj files Pin
Chris Richardson16-Nov-02 11:35
Chris Richardson16-Nov-02 11:35 
GeneralRe: how to work with sln and vcproj files Pin
Stephane Rodriguez.16-Nov-02 20:00
Stephane Rodriguez.16-Nov-02 20:00 
GeneralRe: how to work with sln and vcproj files Pin
Chris Richardson18-Nov-02 7:00
Chris Richardson18-Nov-02 7:00 
Generalportability 2 Pin
Ian Dermott16-Nov-02 2:58
sussIan Dermott16-Nov-02 2:58 
GeneralRe: portability 2 Pin
ian mariano16-Nov-02 9:03
ian mariano16-Nov-02 9:03 
GeneralRe: portability 2 Pin
ian mariano16-Nov-02 9:10
ian mariano16-Nov-02 9:10 
GeneralIIS: a theoretical question - processes and threads Pin
devvvy16-Nov-02 2:48
devvvy16-Nov-02 2:48 
GeneralRe: IIS: a theoretical question - processes and threads Pin
ian mariano16-Nov-02 8:42
ian mariano16-Nov-02 8:42 
Generalchanging frame window looks Pin
B4u16-Nov-02 0:52
B4u16-Nov-02 0:52 
GeneralRe: changing frame window looks Pin
dabs16-Nov-02 2:42
dabs16-Nov-02 2:42 
Generalswap values of two variable Pin
Anonymous16-Nov-02 0:24
Anonymous16-Nov-02 0:24 
GeneralRe: swap values of two variable Pin
moliate16-Nov-02 0:29
moliate16-Nov-02 0:29 
GeneralRe: swap values of two variable Pin
NormDroid16-Nov-02 7:09
professionalNormDroid16-Nov-02 7:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.