AnsweredAssumed Answered

vrf Importing DLL's, passing by reference

Question asked by VRFuser on Aug 18, 2004
> Pretty sure.  Although I thought
> char* described a string scalar,
> not a string array.

It does. But once you splat it again it means string array. There are two
splats in"char* *szAxes". Here, szAxes is a string array, not a scalar.

> //The output should be "1=NOSTAGE
2=NOSTAGE
3=NOSTAGE
4=NOSTAGE
"

Got it. The declaration is wrong. Use a single splat. On both Axes and
names. What we have here is:

int __stdcall C843_qVST(
  [in]  int   iId,
  [in]  char* szAxes,
  [out] char* names,
  [in]  int   maxlen);

szAxes is a string scalar describing what axes to get whatever for, names is
a string scalar that returns the output from the function and maxlen is the
size of the buffer allocated for names. So, in VEE:

names = "*" * 1023;
C843_qVST(id, "1234", names, strLen(names));

The function must be called with a call object because names is an out
param, and the names pin on the right side of the call object will contain
the string returned from the function. You might want to pass it through a
>From String parsing in Token Format with "
" as the excluded token. The
output from that will be a string array of each of the output strings.
-SHAWN-


---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes