[fpc-pascal] DLL call works on FPC 2.6.4 but not with D7
Virgo Pärna
virgo.parna at mail.ee
Wed Jul 2 12:26:40 CEST 2014
On Wed, 2 Jul 2014 11:23:33 +0200, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
>
> As has been mentioned earler in the thread, MyReturnStr itself is a
> pchar.
>
Sorry, I had to recheck thred multiple times before I found it. Initially
he did not mention the type at all.
Anyway, if variable is of type PChar, then there is not reason to take
an address of first element to pass it to PChar. Passing wariable itselt is
much clearer.
And for ansistring MyReturnStr casting it to PChar would have worked also.
After setting it to required length with SetLength.
--
Virgo Pärna
virgo.parna at mail.ee
More information about the fpc-pascal
mailing list