>Decide what you like - if VFP is in a tight processor loop, doing no screen I/O, the VFP (runtime or interpreter) code that responds to Windows Messages may not receive the message. This is evidenced often by a message box coming up telling you the task is not responding, asking if you want to End Task immediately or Continue to Wait. Selecting End Task issues an immediate TerminateProcess(), and that doesn't talk to the event loop at all - it simply starts releasing resources and cancelling the TCB for the running process, killing it and all its threads and fibers, giving no chance to let them execute their shutdown code, or in the case of OLE Servers, the actions in OnFinalRelease, which causes some memory leaks that can't be recovered without a shutdown/restart.
Hi,
This is why I suggest EWX_FORCE as the terminating parameter. This by-passes the messy situation you describe.
BTW, and for the second time, there is no WM_SHUTDOWN message. It's WM_QUERYENDSESSION that's sent when Windows shuts down.
George
Ubi caritas et amor, deus ibi est