add the "class" : "class CSampleGrabberCB : public ISampleGrabberCB"
will capture the bitmap by reference the sample "Microsoft DirectX 9.0 SDK (Summer 2004)\Samples\C++\DirectShow\Editing\GrabBitmaps"