Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

LabVIEW Information

  • Version
    LabVIEW 2010
  • Since

greatwall's Achievements


Newbie (1/14)



  1. QUOTE (bsvingen @ Apr 6 2009, 02:59 PM) thanks very much! It is not a good idea to use dlls returning pointer argument ,I think so too. because the dll is not mine, I only have the head file and dll, it seems that I must re-disposal it in C++. thanks again!
  2. hi, I am in trouble now! I have a dll , i want get same altered values from the parameters by passing pointers as arguments to a function.my function definition is as following. ========mydll.h======== ##ifdef __cplusplus extern "C" { #endif __declspec(dllexport) char *str (int *num,char **ch); #ifdef __cplusplus } #endif =========mydll.cpp====== #include "mydll.h" char *str(int *num,char **ch) { char *pstr = "this is string!"; *num = 10; *ch =pstr; return *ch; } and then I create another project to test this dll ,it works correctly. but if I use labview to call the dll,it is incorrect. in c++,call the function as follows: int a = 0; char *b =""; char *rtnStr = str ( &a,&b); after executing the "str" function,the return value and all arguments are: a = 10; b = this is string! rtnStr = this is string! but in labview, I wrap this dll by setting return value as string(c string pointer),setting parameters as numeric (pointer to value) and string(c string pointer). I think my setting is correct! but the result is incorrect! a = 10 b =(unknowing char) rtnStr = this is string! Why "b" can not get the string as calling in C++? if I want to get the value by passing pointer. How should I do ?
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.