Re: [fpc-pascal] DLL calling Firebird: slow and crashes at the end

2014-09-27 Thread Mark Morgan Lloyd
Reinier Olislagers wrote: On 26/09/2014 21:41, Mark Morgan Lloyd wrote: Reinier Olislagers wrote: If using pchars: is the program doing all storage allocation for these or is the DLL also allocating memory? The DLL is generating those pchars. What frees them? Heh ;) Ok, I think I've got it w

Re: [fpc-pascal] DLL calling Firebird: slow and crashes at the end

2014-09-27 Thread Reinier Olislagers
On 26/09/2014 21:41, Mark Morgan Lloyd wrote: > Reinier Olislagers wrote: >>> If using pchars: is the program doing all storage allocation for these >>> or is the DLL also allocating memory? >> The DLL is generating those pchars. > > What frees them? Heh ;) Ok, I think I've got it worked out now:

Re: [fpc-pascal] DLL calling Firebird: slow and crashes at the end

2014-09-26 Thread Mark Morgan Lloyd
Reinier Olislagers wrote: Let me explain: postcode.lpr: Lazarus GUI program with LCL etc that uses business layer (+db layer etc) dlldemo.lpr: console application that demonstrates use of dutchpostcode.lpr: dll source using business layer (which calls db units etc - business layer is the same un

Re: [fpc-pascal] DLL calling Firebird: slow and crashes at the end

2014-09-26 Thread Reinier Olislagers
On 26/09/2014 17:41, Mark Morgan Lloyd wrote: > Reinier Olislagers wrote: > I'm in the middle of kernel test builds at the moment, so forgive me if > I'm not giving your posted example as much attention as it deserves. I understand, thanks. Have quit coding for the day myself, will get back on thi

Re: [fpc-pascal] DLL calling Firebird: slow and crashes at the end

2014-09-26 Thread Mark Morgan Lloyd
Reinier Olislagers wrote: On 26/09/2014 17:06, Mark Morgan Lloyd wrote: For Linux, cmem before HeapTrc before cthreads before Classes etc., in both main program and DLL. Otherwise play with String[255] etc. Thanks. Currently not using cmem or heaptrc or cthreads. (The "regular" GUI application

Re: [fpc-pascal] DLL calling Firebird: slow and crashes at the end

2014-09-26 Thread Reinier Olislagers
On 26/09/2014 17:06, Mark Morgan Lloyd wrote: > For Linux, cmem before HeapTrc before cthreads before Classes etc., in > both main program and DLL. Otherwise play with String[255] etc. Thanks. Currently not using cmem or heaptrc or cthreads. (The "regular" GUI application using the db etc units do

Re: [fpc-pascal] DLL calling Firebird: slow and crashes at the end

2014-09-26 Thread Mark Morgan Lloyd
Reinier Olislagers wrote: DLL creation newbie here; Windows; x86 FPC trunk. Going with the FPC programmer's guide, I wrote a DLL that looks up address data in a Firebird embedded db. Managed to get a console demo calling it running but: 1. It is slow to show output: no output for a while before

[fpc-pascal] DLL calling Firebird: slow and crashes at the end

2014-09-26 Thread Reinier Olislagers
DLL creation newbie here; Windows; x86 FPC trunk. Going with the FPC programmer's guide, I wrote a DLL that looks up address data in a Firebird embedded db. Managed to get a console demo calling it running but: 1. It is slow to show output: no output for a while before showing the results of the