Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   cam exception (http://www.chiefdelphi.com/forums/showthread.php?t=104071)

Method 01-03-2012 19:34

cam exception
 
hello
caused an exception in my code but it's a little strange since I undid changes and it didnt start working again... Part of the problem is probably that i didnt have a backup

//in constructor
AxisCamera *camera;


ColorImage img(IMAQ_IMAGE_RGB);
printf("first\n");
Wait(2.0);
printf("second\n");
camera->GetImage(&img);//This is where the exception is
printf("third\n");

I've been trying different combinations that I thought would work to no avail. Any help would be great- thanks

mikets 01-03-2012 21:04

Re: cam exception
 
Of course you will have an exception, your camera pointer has not been initialized.
Code:

AxisCamera *camera = AxisCamer::GetInstance("10.xx.yy.11");

Method 01-03-2012 22:07

Re: cam exception
 
hehe- thanks; that used to be elsewhere in my code.. forgot to put it back in when I was moving it


All times are GMT -5. The time now is 13:05.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi