LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert a Variant of type=String to G data? (LV 5.1.1)

I've tried to return a string in the Variant return of a VB function in a DLL. (I want to do this so that I can retain the interface and thus binary compatibility in the DLL.)
When I use the DLL function in LabVIEW 5.1.1 I
get an error in the call library function call (returning). It looks like there is a way to handle this in v 6.0 but I have to use 5.1.1 for this application. Is there a way for LV 5.1.1 to handle a Variant containing a string?

Thanks
Dave Karon
Concepts NREC
0 Kudos
Message 1 of 3
(2,910 Views)
Hi Dave,

you can use the type conversion function located under advanced -> data
manipulation to convert the variant into a string.

Henrik


Dave Karon schrieb in im Newsbeitrag:
506500000008000000C5260000-993342863000@exchange.ni.com...
> I've tried to return a string in the Variant return of a VB function
> in a DLL. (I want to do this so that I can retain the interface and
> thus binary compatibility in the DLL.)
> When I use the DLL function in LabVIEW 5.1.1 I
> get an error in the call library function call (returning). It looks
> like there is a way to handle this in v 6.0 but I have to use 5.1.1
> for this application. Is there a way for LV 5.1.1 to handle a Variant
> containing a string?
>
> Thanks
> Dave Karon
> Concepts NREC
0 Kudos
Message 2 of 3
(2,910 Views)
It looks like my problem is in the return from the DLL.
It looks like the AX method node does not cope with a returned Variant of type=String.
Also, I do not see a type conversion function other than the "Type Cast" vi.
Is that a new function in version 6?
Thanks
Dave
0 Kudos
Message 3 of 3
(2,910 Views)