Since qedit.h is no longer on Windows SDK you have to get definition of Sample Grabber related interfaces. One method is to use older SDK with all headers still on it. Another method is to #import
the interfaces from type library. And you can always re-defined them right in code.
You can grab the correct definition from there:
struct __declspec(uuid("0579154a-2b53-4994-b0d0-e773148eff85"))
ISampleGrabberCB : IUnknown
{
virtual HRESULT __stdcall SampleCB (double SampleTime, struct IMediaSample * pSample ) = 0;
virtual HRESULT __stdcall BufferCB (double SampleTime, unsigned char * pBuffer, long BufferLen ) = 0;
};
Because you did not have __stdcall
on yours, the wrong calling convention was used and your this
was NULL
.