Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Attaching DirectShow Image to Imaq Viewer

Hello,

 

I designed a class that allows me to stream a USB camera image to a Picture control.  Basically I pass the m_hwnd handle of the object to the DiectShow to attach and bind streaming video.  What I want to do is attach the video image to the Imaq viewer object.  The issue is the Imaq Viewer object is an activeX control and requires a parameter passed as a data type of LPDISPATCH.   I have tried to obtain the IDispatch from a pointer to the IVMRWindowlessControl9 DirectShow interface, but keeps on reurning E_NoInterface.  Does anyone have any ideas or another way to attach to the Imaq Viewer object?

 

Thanks,

 

Argneka

 

0 Kudos
Message 1 of 2
(6,545 Views)

Hi Argneka,

The IMAQ Viewer has a .attach method.  In order to get the image from DirectShow into the viewer you will need to pass it a image data type.  If it is possible for you to get a image data type out of DirectShow then you should be able to use this method to display it in the IMAQ Viewer.

Message Edited by Adam_H on 11-17-2008 04:39 PM
Adam H
National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(6,530 Views)