View Full Version : How to trigger device lost function
September 5, 2008, 11:39:57
HAI THIS IS SHANKAR
I NEED TO USE USE DEVICE LOST FUNTION IN MY PROGRAM AS LIKE FRAMEREADY I LIKE TO USE THIS DEVICELOST FUNCTION IN MY PROGRAM, EVEN TOUGH I REGISTER FOR THIS FUNCTION IN ADDLISTENER WITH PARAMETER eALL BUT THE FUNCTION IS NOT TRIGGERED WHEN I UNPLUG THE CAMERA .
September 5, 2008, 12:49:09
The DeviceLost function is a member of the GrabberListener class. You must inherit your own class from the GrabberListener class and implement the DeviceLost method.
After doing so, you must add your GrabberListener inherited object to the grabber object using the method "Grabber::addListener()";
Please refer to:
You may also have a look into the "Callback" sample of IC Imaging Control.
September 5, 2008, 14:03:26
thank for to reply
i follow all the above steps which u prescribe even tough i didnt trigger devicelost function.
first i inherit my class(by name listener) to grabber listener and then i call addlistener function with listener class object and eALL as parameter, then i implement devicelost function to display warning message (using afxmessage box)
:rolleyes: frameready function is workingproperly
September 5, 2008, 14:06:51
The parameter call seems to be correct. I guess, you use a DCAM camera or a video capture device, that really can be disconnected from the computer. If you use a PCI Framegrabber and an analogue camera and you removed the camera, then the framegrabber stays in the computer and works properly. Thus the "Device Lost" event is not fired.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.