callback method and ISampleGrabber 
Author Message
 callback method and ISampleGrabber

Hi:

I need an app to capture still images from a media using
DirectX and VB.
As the sdk's say I'm using ISampleGrabber and
ISampleGrabberCB.

I'm trying with the callback method. Same part of my code
is like this,

   m_objSampleGrabber.SetOneShot False
   m_objSampleGrabber.SetBufferSamples True

   Set m_objSampleGrabberCB = New CGrabCB

   ' 0 -> SampleCB
   m_objSampleGrabber.SetCallback  m_objSampleGrabberCB, 0

where m_objSampleGrabber is a ISampleGrabber and
m_objSampleGrabberCB is an object of my
class, CGrabCB, that inherits from ISampleGrabberCB.

The problem is that in the inherit method
ISampleGrabberCB_SampleCB of this class I can't access to
the method GetPointer of the IMediaSample Interface, I
think that this method give me a pointer to the still,
sample, image in memory. The message is as follow:

   Compile error:

   Function or inteface marked as restricted, or the
funtion uses and Automatation type not supported in Visual
Basic.

What am I doing wrong? Is not possible to use callback
method from VB?

Thanks in advance.



Tue, 07 Dec 2004 16:57:19 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. default IDispatch method??? VB IHTMLDocument2 callbacks

2. DirectShow ISampleGrabber VB help needed

3. ISampleGrabber

4. OLE Callback vs Implemented Interface Callback

5. OLE Callback vs Implemented Interface Callback

6. creating a callback function in c++ dll to callback a VB function in an exe

7. followhyperlink method fails to use method constant other than msoMethodGet

8. Display method acting as Show method on built-in dialog File New

9. shared methods vs instance methods

10. Error 405(Method not allowed) error in using webclient.uploadfile method

11. Remove Interface Methods from class methods

12. what is the accepted method or methods to save data expressed in a

 

 
Powered by phpBB® Forum Software