Re: [fpc-pascal] is it possible to kill a thread from within fpc?

2014-09-26 Thread Dennis Poon
Mark Morgan Lloyd wrote: Dennis Poon wrote: I want to kill a thread created by my fpc program (not killing the entire process). I have to use an external win32 dll. I am already calling it from a separate thread but still, that dll something goes into an infinite loop which made my thread

[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

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

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

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: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 this

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