To send a NULL pointer, make a new Call Library Function node and send
the parameter argument as a U32 by value. Since a pointer is also a U32
on most or all LV OSes, any DLL function can't really tell the
difference.  To the computer it's just a 4-byte bundle o' bits.   Just
make two different versions of your CLF node, one passing a string
pointer and the other passing a U32 by value, and decide which one to
call in a LV case statement.


Jason Dunham
SF Industrial Software, Inc.



-----Original Message-----
From: Craig Graham [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 07, 2004 6:25 AM
To: Irene He
Cc: [EMAIL PROTECTED]
Subject: Re: Call Library

Irene He wrote:

> 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.

It turns out you CAN have strings returned by functions- I looked
through
the Comedi stuff and found a function that works that way, so I knew I
wasn't chasing something that will not work. It turns out I have a
problem
passing null arguments; the function I started with can either take a
null
argument to return the library version, or it can take a version as a
string
in which case it only returns the version if it is greater.

The latter behaviour I can now get working, but what I thought was the
simpler case of not passing anything gives me no output. I've also tried
passing a string with /00 in it (in slash notation of course) but it
doesn't
help.

Not a problem at the moment, but it would be useful to know how to pass
null
to a function!

-- 
Dr. Craig Graham, Software Engineer
Advanced Analysis and Integration Limited, UK. http://www.aail.co.uk/






Reply via email to