LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Image to DLL

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

0 Kudos
Message 1 of 5
(3,464 Views)

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.

Message 2 of 5
(3,444 Views)

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

 

 

0 Kudos
Message 3 of 5
(3,424 Views)

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.

0 Kudos
Message 4 of 5
(3,421 Views)

THANKS!!!!!

0 Kudos
Message 5 of 5
(3,418 Views)