View Full Version : How can i check whether there is a grabber ?

March 29, 2004, 08:29:32
When i want to instanciate a new grabber but there is no device
connected, i get a program crash with this line:

m_pGrabber = new DShowLib::Grabber();

How can i check before this call whether there is a framegrabber connected ?

I am using the DFG/1394-1 and Visual Studio.NET 2003.

Stefan Geissler
March 30, 2004, 07:31:25

IC Imaging Control 1.41 is not designed for .NET 2003. Therefore you get a crash. Please send a request to support at imagingcontrol dot com, so i can send you matching DLLs.

To check whether video hardware is connected to your computer, use following code:

DShowLib::Grabber::tVidCapDevListPtr pVidCapDevList = m_Grabber.getAvailableVideoCaptureDevices();
if ( pVidCapDevList != 0 )
if ( !pVidCapDevList->empty() )
// No hardware found.