08-27-2008 07:51 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-27-2008 09:26 AM
Hi, Daniel,
Please read this:
http://forums.ni.com/ni/board/message?board.id=200&message.id=16579
You will found answer in the middle of the discussion.
Andrey.
08-28-2008 05:02 AM
Hi Andrey,
thank you very much, this is exactly what I'm looking for. But what is this for a symbol between the "IMAQ SetImageSize" and the "Call Library Function Node"? I can't find it 😞
Daniel
08-28-2008 05:10 AM
This is IMAQ Image Datatype to Image Cluster.vi. This SubVI is not present in the palette,
located in <Program Files>\National Instruments\LabVIEW x.x\vi.lib\vision\DatatypeConversion.llb
Andrey.
08-28-2008 05:20 AM
THANKS!!!!!