Exception with source filter in DirectShow (0x80040241)

1
var m_FilterGraph = (IFilterGraph2)new FilterGraph();
int hr = m_FilterGraph.AddSourceFilter(file, "Ds.NET FileFilter", out capFilter);

When my project is x64 it will throw System.Runtime.InteropServices.COMException (0x80040241): The source filter for this file could not be loaded. With x86 everything is OK.

It's c# code but the problem is present in every x64 app i've got to build ds graphs. examples: https://code.google.com/p/graph-studio-next/ http://www.codeproject.com/Articles/21105/DSGraphEdit-A-Reasonable-Facsimile-of-Microsoft-s

When i build graph by hand (ex. File source async. -> LavSplitter -> some decoder -> Enhanced Video Render) it's working. So it's rather system problem than code, but x64 video players that i've got are working ok o.O so i don't know... Maybe somebody has an idea what could be wrong?

64-bit
32bit-64bit
directshow
directshow.net
source-filter
asked on Stack Overflow Nov 20, 2013 by 4rch0n

1 Answer

2

32 and 64 bit environments have their own set of filters. They start with similar stock filters and then you install additional filters for 32 bit, 64 bit or both. When you have 32 bit filter installed, and there is no corresponding 64 bit filter, then you you have situation as described in question: Win32 works fine, x64 does not work. Install missing 64-bit filters to have it resolved.

answered on Stack Overflow Nov 20, 2013 by Roman R.

User contributions licensed under CC BY-SA 3.0