>>> We are using Dlls from a single threaded app. When we
>>> call a function in the DLL that returns a pChar some times
>>> this returns corrupted (other characters floating in it). This
>>> generally stuffs up our software. Is this a known problem,
>>> what are the solutions?
>> I assume that ShareMem is the first item in the uses clause of
>> both the DLL and the Application... There are string and Dynamic
>> array issues otherwise and I'm not sure of the symptoms...
> He should only need that if he is using Strings instead of PChars.
I'm assuming that the pchars are allocated space using conventional
strings within the DLL... If they're allocated with Allocmem (?) or fixed
global arrays then the ShareMem won't be the problem.... Personally
I'd use sharemem and design using the String-type and dynamic arrays
as they tidy some of the code up a bit as they avoid pointer notation.
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz