Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-14 Thread DaWorm
Or always allocate and free the buffer in the calling program and load the contents into the buffer in the dll. This way you never have to worry about allocating in one place and freeing in the other. Windows API does stuff like this a lot. In the DLL: Procedure GetSomeString(StringPointer: Poi

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-14 Thread Fred van Stappen
>Also note that this is a good approach with respect to `universiality`, but if you need to... > Ewald Thanks Ewald for your useful advices. Now, a other battle will begin : Create headers for C, CNet, Basic, Java, ... and translate all the uos Pascal examples. But that is not the problem of

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-14 Thread Ewald
On 14 Feb 2014, at 20:28, Fred van Stappen wrote: > >What I have been wondering for some time now (perhaps you wrote it in a > >mail and I missed it): do you use the same memory manager in the library > >and in your test program? > > Oops, indeed i forget that point... > The test now are with cm

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-14 Thread Fred van Stappen
>What I have been wondering for some time now (perhaps you wrote it in a > mail and I missed it): do you use the same memory manager in the library > and in your test program? > Ewald Yeep, Ewald, you are the Winner. And you impress me a lot with your perspicacity. The battle has ended, with

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-14 Thread Fred van Stappen
>What I have been wondering for some time now (perhaps you wrote it in a >mail and I missed it): do you use the same memory manager in the library >and in your test program? Oops, indeed i forget that point... The test now are with cmem only in program, not in library. I will test with cmem into

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-14 Thread Ewald
On 14 Feb 2014, at 20:06, Fred van Stappen wrote: > Hello. > > It seams to me that i monopolize the forum here. > Please advice if it borrow you, i will stop directly... ;-) > > I still fight with cmem and trust me, it is a hard battle. What I have been wondering for some time now (perhaps you

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-14 Thread Fred van Stappen
Hello. It seams to me that i monopolize the forum here. Please advice if it borrow you, i will stop directly... ;-) I still fight with cmem and trust me, it is a hard battle. Mainly because the debugger gives me very few infos and because, if i do not use cmem, all examples are working perfectly

Re: [fpc-pascal] weird compiler(?) problem

2014-02-14 Thread Sven Barth
Am 14.02.2014 09:09, schrieb Xiangrong Fang: 2014-02-14 14:45 GMT+08:00 Sven Barth >: @Xiangrong Fang: do you use 2.6.2 or 2.7.1? I use 2.6.2 Could be that it works a bit better in 2.7.1 as I changed something some months ago... (no guarantees though)

Re: [fpc-pascal] Generics and key words

2014-02-14 Thread Maciej Izak
> Currently only in mode Delphi. > > Regards, > Sven > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal > also "generics overload" (TA, TA) don't work in objfpc... the main r

Re: [fpc-pascal] weird compiler(?) problem

2014-02-14 Thread Xiangrong Fang
2014-02-14 14:45 GMT+08:00 Sven Barth : > > @Xiangrong Fang: do you use 2.6.2 or 2.7.1? > > I use 2.6.2 ​​ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal