Archived

This topic is now archived and is closed to further replies.

MagiXSphere

DirectShow 9.0 GraphBuilder->RenderFile() Exception

Recommended Posts

I''m getting a integer divide by zero hardware exception when trying to render a .mov file in my directshow 9.0 application. MSDN states that DirectShow 9.0 is only able to render up to version 2.0 .mov files. The file I''m trying to render is newer than that and I want the program to tell the user that the file can''t be rendered and then continue execution. I wrote this code which does work:
					_try {
						pGraph->RenderFile(szWBuf, 0);
					}
					_except(GetExceptionCode() == STATUS_INTEGER_DIVIDE_BY_ZERO) {
						ReleaseFilters();
						GetWindowRect(g_hwndVideo, &rect);
						MoveWindow(g_hwndVideo, rect.left, rect.top, 400, 175, true);
						MessageBox(g_hwndVideo, "File could not be rendered!", g_szAppTitle, MB_OK | MB_ICONERROR);
						return EXCEPTION_CONTINUE_EXECUTION;
					}
 
However I don''t see any logic in checking for a integer divide by zero and I''m wondering if there''s any other way to tell if a file can be rendered or not? All my HRESULT checks fail to detect any error before it''s too late. Thanks in advance.

Share this post


Link to post
Share on other sites