View Full Version : Open Device

May 4, 2005, 12:11:13
Hi all!

Actually my intension is pretty simple, but somehow I don't get it.
I simply like to grab a picture and save it as a .bmp file. Here is the beginning of my very simple code:

#include "stdafx.h"

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow ){

if( ! DShowLib::InitLibrary( "IS-XXXXXXXXXX" ) )
return 0;

DShowLib::Grabber * grabber;
grabber = new DShowLib::Grabber();

grabber->openDev("DFK 31F03");
bool valid = grabber->isDevValid();

DShowLib::FrameGrabberSink::eSNAP, DShowLib::eY8 ) );

int size_buffer = grabber->getAcqSizeMaxX() * grabber->getAcqSizeMaxY() * 1;

---------- and so on... ---------------------------------------

Problem :
the " grabber->isDevValid(); " returns 0. That means the device couldn't be found, right?
But with a sample program (coming with the IC Capture software) I have a live stream and can take pictures...

Does anybody of you guys know where the problem might be? I'd be very very glad!!!

Thanks a lot!

Stefan Geissler
May 4, 2005, 14:48:28

Could you send your complete project as a ZIP file to support@imagingcontrol.com? So i could have a look on it.