AnsweredAssumed Answered

vrf DLL string problem

Question asked by VRFuser on Mar 25, 2001
Thanks everyone for the help on the problem...Just out of curiosity, is
there any explanitions why "name=p" doesn't work? I worked throught it
duriing debug process, name was being assign the value of "p" but when it
goes back to VEE (from the dll), its new value lost...

best regards,
yawbang
Univ. of Liverpool.


>  -----Original Message-----
>  From: owner-vrf@lvld.agilent.com [mailto:owner-vrf@lvld.agilent.com]On
>  Behalf Of rpage@futaba.com
>  Sent: 22 March 2001 20:39
>  To: Y.Low@liverpool.ac.uk
>  Cc: vrf@lvld.agilent.com
>  Subject: RE: vrf DLL string problem
>
>
>  Hello YawBang
>  Use strcpy(name, P); instead of name = P;.
>  I see attached files
>
>  Rick Page
>  Test/Software Engineer
>  Futaba Corp of America
>  1605 Penny Lane
>  Schaumburg, IL 60187
>  Tel: (847) 884-1444 x162
>  Fax:(847) 884-4988
www.futaba.com
>
>
>  -----Original Message-----
>  From: Y B Low [mailto:Y.Low@liverpool.ac.uk]
>  Sent: Thursday, March 22, 2001 11:13 AM
>  To: Vrf
>  Subject: vrf DLL string problem
>
>
>  Hi. I have a problem here with getting a char string from a DLL.
>
>  Please refer to the attached files as well. The following compiled
>  function:-
>
>  //function reference
>  void MyStringfcn(char *name, int *InitLen,  int *afterLen);
>
>  //function defination
>  DLLEXPORT void myStringFcn(char *name, int *InitLen, int *afterLen)
>  {
>       char *P = "New String"; // string of lenght of 10 char
>       *InitLen = strlen(name);
>       name = P;
>       *afterLen = strlen(name);
>       return;
>  }
>
>
>  myStringFcn takes in a charactor pointer and assign the pointer
>  to point to
>  a string called "New String". The the function return the new
>  lenght of the
>  string ("New String" == 10, through *afterLen) and the orighanl length of
>  the string(which is 5, for "Hippo") through pointer *InitLen.
>
>  Running the program, passing "hippo" to the function, the
>  function returns
>  the correct info for the *InitLen and *afterLen. But it doesn't
>  return the
>  "New String" to *name. I have no idea what is the bug here. Can
>  anyone offer
>  me some help?? Thanks in advance.
>
>
>
>
>
>  Regards,
>  YawBang Low
>  Univ. of Liverpool.
>
>
>
>

---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------

Outcomes