[fpc-pascal] DLL call works on FPC 2.6.4 but not with D7

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Jul 1 19:28:53 CEST 2014


On 01/07/14 19:06, Paul Breneman wrote:
> Thanks Jonas for the help!  This now works for me in FPC (MyReturnStr is
> PChar):
>        Status := ps5000aGetUnitInfo( ps5000a_handle, @MyReturnStr[ 0],
> StringLen, requiredSize, RInfo);
>
> But in D7 using "@MyReturnStr[ 0]" gives an Access violation exception
> in the dll.  The address the DLL is trying to write is about the same as
> in FPC so I still don't understand why FPC works but D7 doesn't.

How are you allocating space for MyReturnStr?


Jonas




More information about the fpc-pascal mailing list