Here is what I saw hooking WM_CLOSE. I have excluded the WM_DESTROY messages of controls for simplicity.

Canceled
WM_CLOSE: 1376684 16 0 0 mIRC mIRC
WM_CREATE: 1180678 1 1225544 0 #32770
WM_DESTROY: 1180678 2 0 0 #32770 Confirm Exit
WM_CLOSE_RETURN mIRC 1376684

Close Confirmed
WM_CLOSE: 1376684 16 0 0 mIRC mIRC
WM_CREATE: 1246214 1 1225544 0 #32770
WM_DESTROY: 1246214 2 0 0 #32770
(NO RETURN)

It then appears that WM_DESTROY is sent out to all(?) mIRC children. The "confirm on exit's" dialog and controls receive WM_DESTORY first. Then any controls the DLL created receive WM_DESTROY. Here is where output stops, either because the DLL was unloaded or because mIRC will no longer process WM_MCOMMAND.


NaquadaBomb
www.mirc-dll.com