LabWindows/CVI

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 3
(2,887 Views)

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

0 Kudos
Message 2 of 3
(2,868 Views)

Hi, thanks!

 

The solution is explained in this thread:

 

http://forums.ni.com/ni/board/message?board.id=200&message.id=16579

 

 

0 Kudos
Message 3 of 3
(2,844 Views)