He's not properly shutting down mIRC before properly shutting down windows.
Woah let's back this train up a second here. Are you telling this user that there is a "correct" way to shut down his programs? If so, please support your comments by showing microsoft documentation telling their clients to shut down programs manually before clicking the shut down button
As far as I know, there is no such documentation. Shutting down windows tells all programs to exit _normally_ before attempting to shut down. In fact, from what I know, windows will attempt to exit all programs _for you_. Therefore, there should be no reason for mIRC to be shut down before anything else is.
In addition, because this is defined as a _normal_ exit by MSDN standards (read the docs on the message sent by windows, mentioned in the last post: WM_QUERYENDSESSION) mIRC should in fact treat it as such and:
a) Trigger the ON EXIT event (which it might not do, haven't tested)
b) Save all the settings
c) Exit normally!
As per MSDN documentation:
If an application can terminate conveniently, it should return TRUE; otherwise, it should return FALSE.
Because you see no trouble from the OS when it closes mIRC on a shutdown, this means that mIRC did in fact return TRUE to that message. This also means mIRC acknowledges that it will exit and _should _take the necessary steps to treat this as any other "convenient" (normal) exit:
When an application returns TRUE for this message, it receives the WM_ENDSESSION message and it is terminated, regardless of how the other applications respond to the WM_QUERYENDSESSION message.
According to that, mIRC is reacting incorrectly to a window message sent by the operating system. This means that: it is in fact a bug.
The simple fix:
- Add WM_QUERYENDSESSION as a case in mIRC's WindowProc next to WM_QUIT and the like and return TRUE after performing all the steps for a normal exit