If the DLL does not "exit" when the calling EXE is finishes (ie, some reenterant or secondary thread code in the DLL is still running), then the Process hasn't actually finished running... once that DLL code stops running, the whole process will then be fully terminated normally.
The situation with Edwin's comment is similar: Until the GPF dialog is closed, the process will not have been shut down. Once that GPF dialog button is clicked though, the whole Process will be completely and immediately terminated (abnormally) without notification to the Process. If the GPF occurs in a thread, then at a minimum that thread will be affected, but it may affect the whole process. It realistically depends on what is going on at the moment of failure.
In the case of leaving the GPF dialog open, closing the main thread (the main app) may cause unexpected problems, since one of the app's threads is suspended. If the app's remaining threads are halted by a synchronization object that depends on the suspended thread (or some other similar problem that the suspended thread causes), the app will freeze anyway.

Disclaimer: these comments are based on my observations and my understandings of how Windows handles abnormal Process termination. So, can anyone dredge up a good MSDN reference on this topic so we can clarify the exact rules, assuming there is such documentation available? (I'm away from my DEV PC to check for myself!)
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Leave a comment: