I have a C DLL that returns a pointer to a PAnsiChar string managed by a C DLL. I would like to make a copy of the string so that it can be controlled on the Delphi side.
If I returned the returned PAnsiChar to AnsiString, as in "str: = AnsiString (myPAnsiChar)", what does the actor do? Does the allocation include new memory for the line pointed to by PAnsiChar, or do I first need to make a copy of the line coming from the DLL?
rhody source share