Stacey asked about a nasty Windows event exception:

> How do I go about debugging a problem like this?

The best approach that I can think of, baring the Zen method of just fixing
it 8-), is to do some serious event logging in your code.

This kind of event being sent to a destroyed handle is very tricky to fix
without knowing the series of events that lead to the event being posted, so
you need to add simple logging to the window destroy event, any event
posting and in the event dispatcher.

You can probably get this down to just two places in the code if you use
SetWindowsHookEx to add an event hook to catch any events just about to be
dispatched, or do a temporary patch in Forms.pas in the event loop code, and
if you hook the Win32 SendMessage and PostMessage API's to be able to log
when events are sent. Or you can do a brute force approach and just add more
and more logging code (preferabbly IFDEF'd) until you can see the problem.

If you need any help with the Win32 API interecption, or the
SetWindowsHookEx incantations just ask.

Cheers, Max,


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to