March 22nd, 2011, 01:30 PM
I'm working on a DLL which will serve as the back end or engine for an arbitrary Win32 GUI front end to connect to. My back end should have no graphical code, of course. What I'm making is an interface for a camera-like device. This device has an SDK I'm using which utilizes CALLBACKs. Through several of these callbacks, which run in their own thread, I receive an image (as an object) from the camera device. I need an efficient way to forward this image to the Win32 GUI developer without exposing him to the SDK's callback functions. This image must be immediately forwarded because the Win32 Developer may want to display it the moment it is received, as these images are continually streaming from the device. (Ultimately, if you were to display the images as they came from the device, what you would get is a video in real-time of the images being captured by the device).
I'm not asking anyone here to solve my problem, but, as an entry level coder, I would like input as to what my options are and what the pros and cons are to each solution. I am concerned with speed.
I'm using MS VS 2008 on Windows XP to write the DLL in C++. The SDK is a DLL and static LIB written in C using an unknown compiler. I don't know how relevant that info is, but, there it is.
Thanks in advance to those who reply.
Last edited by praenato14; March 22nd, 2011 at 01:42 PM.
Reason: Added additional info
March 22nd, 2011, 02:04 PM
Re: Data passing
That sounds like a classical 2d animation.
March 22nd, 2011, 02:10 PM
Re: Data passing
You need to pass these images to UI level using callbacks. In C++ callbacks are easy to implement using callback interface, something like this:
Client creates its own class derived from this interface, and passes pointer to this class as ICallback* to your Dll. When Dll receives an image from low level, it calls ImageAcquired function.
virtual void ImageAcquired( image-parameters ) = 0;
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.