i ahve written a function in a dll and it requires several string parameters.
i have read the help file and it says that ShareMem needs to be included if i am using strings. i want to avoid this. what is the common string type used? PChar?
i have tried this:
procedure one (s: PChar);
str := string (s);
procedure Button1OnClick (Sender: TObject);
I managed to get garbage characters. obviously i am not doing it right. i am used to working with strings, so in the DLL, i want to convert PChar to string. also, how do i ensure that the string i have converted is valid? ie not garbage, regardless of of how the calling routine has defined it...