08-27-2008 07:53 AM
Hello,
I want to pass an IMAQ Image to my Visual C++ DLL. For testing purposes is tried the imaqGetImageSize function, but I always get the error message "not an image". Here is my code:
#include "stdafx.h"
#include "image_test.h"
#include "extcode.h"
#include "nivision.h"
IMAGE_TEST_API long readEndpointImages(const Image **test, int *xRes, int *yRes);IMAGE_TEST_API long readEndpointImages(const Image **test, int *xRes, int *yRes)
{
imaqGetImageSize(*test, xRes, yRes);
return imaqGetLastError();}
In LabVIEW I call the DLL via the Call Library Function, there I pass the image as "Adapt to Type" and "Handles by Value". The other variables are passed as pointers to 32-Bit-Integer...
What am I doing wrong?
Thanks
Daniel
08-28-2008 09:23 AM
Hey Daniel,
Do you have the NI Vision Development Module installed? If so, you should be able to find some examples of that topic under [CVIDIR]\samples\Vision.
You could also use the Vision Assistent to test it and then generate CVI code.
Christian
09-02-2008 09:39 AM
Hi, thanks!
The solution is explained in this thread:
http://forums.ni.com/ni/board/message?board.id=200&message.id=16579