LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

what is LV c code representation of NULL string

I know that through .so/.dll code the representation of any string is a structure of the length followed by the characters, I allocate a long blank string in the LV code and copy over my strings in the .so/.dll and that works fine. How do I return a LV NULL string?
0 Kudos
Message 1 of 2
(2,549 Views)
dgholstein wrote:

> I know that through .so/.dll code the representation of any string is
> a structure of the length followed by the characters, I allocate a
> long blank string in the LV code and copy over my strings in the
> so/.dll and that works fine. How do I return a LV NULL string?

As long as LabVIEW is not supporting 64 bit platforms a NULL pointer is
really just a 32 bit integer with the value 0.

So if you want to call a dll/so function which allows for a NULL pointer
as parameter, you configure that parameter to be a signed or unsigned 32
bit integer and wire the value 0 to its input.

As to the LabVIEW string itself if you call a DLL it is usually better
to use a C string type instead of the native LabVIEW handle. Once you
use a LabVIEW handle t
hat DLL really is difficult to use in other
environments than LabVIEW.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 2
(2,549 Views)