i am writing a source filter that supports IFileSourceFilter. it is a
barebones filter right now - i.e. it doesn't do anything except ask for a
in visual studio, I am using "graphedt.exe" as the debugging command. I run
graphedt, and then I try to add my source filter to the graph.
when I attempt to run, i set a breakpoint inside of
IFileSourceFilter::GetCurFile() (actually CSourceFilter::GetCurFile() of
course). I get in there and continue (F5), and visual studio (.net 2005 btw)
pops up a dialog that says:
Windows has triggered a breakpoint in graphedt.exe
This may be due to a corruption of the heap and indicates a bug in
graphedt.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information.
[ Break ] [ Continue ]
My output window looks like this:
If I continue it seems to be okay. I am not doing anything special in my
GetCurFile() call either.
/* virtual */ STDMETHODIMP CSourceFilter::GetCurFile(LPOLESTR* ppszFileName,
int buflen = m_wstrFileName.length() + 1;
LPOLESTR oszFileName = LPOLESTR(::CoTaskMemAlloc(buflen));
errno_t err = wcscpy_s(oszFileName, buflen, m_wstrFileName.c_str());
if (0 != err)
*ppszFileName = oszFileName;