01-27-2009 03:24 PM
I have a GIG-E camera working in a VI.
The Vi is compiled into a dll with several other VI's.
I am able to "return" doubles, integer etc no problem. ![]()
Now I need to return an image and data...
The VI is a very simple:
Vision Acquision object --->IMAQImage Properties ----> Image out. (And it works)
I linked the Image Out Indicator to a terminal so it would show in the DLL items to expose...
But it was gray in the Build tool so i set it as an argument.
I compiled the dll and tested the vi.
I can still call my other VI's such as Reading my HP meter.
Declare Auto Function Read6Fast Lib "C:\VI s\ReadMeter_.dll" (ByRef reset As Boolean) As Double
...
label_somelable.text = ReadSingle(True)
...
So am assuming I can do similar and return an image or a cluster
For example:
Declare Auto Function Snap1 Lib "C:\VI s\ReadMeter_.dll" (ByRef tmp As Boolean, pic As BitMap)
...
SomeImageContaner.Image = pic
...
So How do I get a single Image out?
Cheers
01-28-2009 06:29 AM
Hi,
The easiest (but not fastest) way is following - convert image to array and return two dimensional array from DLL
Andrey.
01-28-2009 02:36 PM
Ok that makes some sense.
I was able to convert to an array.
Now, how do I cast it back to an image on the VB side?
I have an array of pixels right, Basically a bitmap?
cheers