Re: Array into dll

2004-05-11 Thread Nanxiong
Did you set the Calling Convention as "stdcall" in the Call Library
Function node of LabVIEW? The default is C.



Array into dll

2004-05-11 Thread bfarley
I built a dll in LV 7.  One of the inputs was an array of strings.  LV
created the following typedef for this input:
typedef struct {
long dimSize;
LStrHandle elt[1];
} TD2;
typedef TD2 **TD2Hdl;

The function prototype generated by LV is:
void __stdcall AddRow(TD1 *errorInNoError, TD2Hdl *TestResult,
LVRefNum *WordTableIn, LVRefNum *WordSelectionIn, TD1
*errorOut);

The question is to call this function, what do I have to pass into the
dll from LV?  I've tried several ways and it keeps crashing.  When I
create the dll, it doesn't give me the option to define the input as
an array, it just creates the typedef.  So when I configured the dll,
I chose "Adapt to Type".  This didn't work with either "Handle by
Value" or "Pointer to Handle".  If I configure the input as an Array,
there is no string type listed (uint32 maybe?)

TIA
Bill F