Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-28 Thread Jonas Maebe
kyan wrote on Thu, 28 Jun 2012: On Thu, Jun 28, 2012 at 12:45 PM, Jonas Maebe wrote: The safecall calling convention is only supported on a few platforms. I want it for Win32/64, WinCE/arm and Linux. How can I find whether it is implemented on these platforms without having to actually tes

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-28 Thread kyan
On Thu, Jun 28, 2012 at 12:45 PM, Jonas Maebe wrote: > The safecall calling convention is only supported on a few platforms. > Originally it was only supported on Windows. Nowadays it's also supported on > a few extra platforms because it was required for XPCOM (someone wanted to > use XPCOM on ce

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-28 Thread Jonas Maebe
kyan wrote on Thu, 28 Jun 2012: It seem that the way to go -I don't have much knowledge on SEH so I'd rather not mess with such low level system code- is to try to turn my API to safecall and install a SafeCallErrorProc handler that will try to recreate and raise the safecall exception from the

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-28 Thread kyan
On Wed, Jun 27, 2012 at 8:15 PM, Sven Barth wrote: > Summa summarum: don't let exceptions travel past the DLL boundary. One might > be able to fix it on Windows, but *nix maybe not so much... Thank you for your reply Sven. It seem that the way to go -I don't have much knowledge on SEH so I'd rat

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-27 Thread Mark Morgan Lloyd
Apologies for my poor threading. Sven said: > Unix based systems might be a different topic altogether. I've no > experience regarding cross module excetions on *nix, so I can't > comment whether it works or not... > Summa summarum: don't let exceptions travel past the DLL boundary. One > might

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-27 Thread Sven Barth
Am 27.06.2012 15:59 schrieb "kyan" : > > I am sure that this has been asked before but I couldn't find an answer. > > I am in the process of porting a large application consisting of an > exe and many dlls from Delphi7 to FPC 2.7.1/Lazarus for Windows/WinCE > with hopes of being able to finally por

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-27 Thread kyan
Thank you all for your replies. > Regular exceptions, those raised with the "raise" keyword are always trapped > by try..except blocks but you have to make sure that EVERY method in the DLL > that is called by the host exe has such a construct so as not to let the > exception escape. As I already

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-27 Thread Antonio Fortuny
Le 27/06/2012 16:14, OBones a écrit : Hello, Regular exceptions, those raised with the "raise" keyword are always trapped by try..except blocks but you have to make sure that EVERY method in the DLL that is called by the host exe has such a construct so as not to let the exception escape. Ho

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-27 Thread michael . vancanneyt
On Wed, 27 Jun 2012, Antonio Fortuny wrote: Le 27/06/2012 15:58, kyan a écrit : I am sure that this has been asked before but I couldn't find an answer. I am in the process of porting a large application consisting of an exe and many dlls from Delphi7 to FPC 2.7.1/Lazarus for Windows/WinCE

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-27 Thread OBones
Hello, Regular exceptions, those raised with the "raise" keyword are always trapped by try..except blocks but you have to make sure that EVERY method in the DLL that is called by the host exe has such a construct so as not to let the exception escape. However, there are exceptions that come fr

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-27 Thread Antonio Fortuny
Le 27/06/2012 15:58, kyan a écrit : I am sure that this has been asked before but I couldn't find an answer. I am in the process of porting a large application consisting of an exe and many dlls from Delphi7 to FPC 2.7.1/Lazarus for Windows/WinCE with hopes of being able to finally port it to L

[fpc-pascal] Unhandled exception from library crashes host exe

2012-06-27 Thread kyan
I am sure that this has been asked before but I couldn't find an answer. I am in the process of porting a large application consisting of an exe and many dlls from Delphi7 to FPC 2.7.1/Lazarus for Windows/WinCE with hopes of being able to finally port it to Linux. I have managed to overcome all ob