The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,947 other followers

Archive for June 3rd, 2014

Delphi multithreading and DLL exports: watch your exceptions (via: Stack Overflow)

Posted by jpluimers on 2014/06/03

Talking about Danny Thorpe: he also posted a nice hint on threading methods for ancient Delphi versions that equally applies to DLL exports in any Delphi version, even any programming environment.

Recently, I had to do some surgery in such a Pre-Delphi 6 application, and I was really happy to remember this answer: it instantly solved some process crashes, and the added logging allowed for investigating the actual cause.

Note that this tip isn’t just a good advice for old Delphi versions.

Even in younger Delphi versions, you have to watch methods that can be called from outside a regular Delphi context, for instance exported methods.

Heck, it applies to virtually any development environment: exceptions usually are very specific to that environment and should never cross a process boundary.


Take the approach below

  • for Execute methods in your own thread classes in Delphi 5 or earlier
  • for any method that can be called externally (like DLL exports) Read the rest of this entry »

Posted in Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Software Development | Leave a Comment »

%d bloggers like this: