cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

hello sir/madma

         may i ask question about C/C++ build a api for powerbuilder to consume,i'd like write dll which powerbuilder could call in function which is defined int myfun(string ls_param1,ref string  ls_param2) "mydll.dll;Ansil" ,i just cant figure out the ls_param2 in C++,if should write as

int myfun(char * theparm1,char** ls_param2) ?

do i have to use char ** in the second parameter?

thanks

regards

Ken

0 Likes
View Entire Topic
Former Member
0 Likes

Try this:

short WINAPI myfunc(LPSTR lpParam1,LPSTR lpParam2)

LPSTR indicates a by ref string. I am pretty sure C doesn't distinguish between updateable and non-updateable strings. It is just a memory pointer to a char array.

Former Member
0 Likes

hello sir,i just not familar with C++,however i tried the LPSTR replace the char *,but VC seems not recognize the LPSTR,even i have include<windows.h>,i dont know how to resolve this issue