title: How to use the callback method with a c++ directshow sample grabber
body: <p>I have a sample grabber hooked into my directshow graph, based on this example <a href="http://msdn.microsoft.com/en-us/library/dd407288(VS.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/dd407288(VS.85).aspx</a> the problem is that it uses one shot and buffers.  I want to continuously grab samples, and i'd rather have a callback than i guess polling for the samples.</p>
  
  <p>How do use the SetCallback method?</p>
  
  <pre><code>SetCallback(ISampleGrabberCB *pCallback, long WhichMethodToCallback)
  </code></pre>
  
  <p>how do I point pCallback to my own method?</p>