Click to See Complete Forum and Search --> : Object reference not set to an instance of an object ??


codegurugeek
August 3rd, 2005, 03:46 AM
I keep on getting the error above, "


HRESULT QueryMyFilter(LPCWSTR filelocation)
{
> hr = filefilter->QueryInterface(IID_IFileSinkFilter,(void**)&fsinkfilter);
fsinkfilter->SetFileName(fileloc,NULL);
}


The debugger point at the ">" location ....

Please Advise

codegurugeek
August 4th, 2005, 12:52 AM
declaration ::

IBaseFilter filefilter = NULL;
IFileSinkFilter fsinkfilter=NULL;
..
..



HRESULT QueryMyFilter(LPCWSTR filelocation)
{
> hr = filefilter->QueryInterface(IID_IFileSinkFilter,(void**)&fsinkfilter);
fsinkfilter->SetFileName(fileloc,NULL);
}



i am really out of clue, when i check the msdn, i found out that
IBaseFilter dont have the "QueryInterface" method in it.
and when i use the filefilter like the following :

filefilter->QueryInterface <---- it shows that it is from "Unknwn.h"


Please advise thank you