----- Original Message ----- 
From: "Craig Graham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 07, 2004 3:25 AM
Subject: Call Library

...
> This is on Linux, if it's relevant. I have a library with a function whose
> prototype (from the header file) is;
> const char *gpgme_check_version (const char *req_version);
>
> This function returns a string and takes either a string or null,
depending
> on how you want it to work. For simplicity I'm passing nothing to it. In a
C
> compiler I can get this to return the version number of the library so I
> know it's working.
>
> In Labview (7.0) the closest I can get to this prototype using the "Call
> Library" node is
>
> unsigned char gpgme_check_version(CStr req_version);
> CStr gpgme_check_version(CStr req_version);
>
> I've also tried not specifying  the argument passed to the function. If it
> is specified, I wire an empty string to the input.
>
> When the VI runs, no data comes back. There are no errors- the VI is
> executable and Labview doesn't segfault. I know that when getting arrays
> back from a function in general you have to supply preallocated space, but
> there's no input terminal as such for the return code- just a shaded
> placeholder. Nonetheless, I can wire a generously-sized string to it with
no
> errors, although it doesn't help.


Dear Dr. Craig,
I've never used the return type as string (I don't remember if this type
exsits in version before LV7), I always leave it as argument, because I know
this way it always work. If as argument, you need to preallocate a space for
the string.

Regards,

Irene He
www.geocities.com/irene_he
www.hytekautomation.com




Reply via email to