[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

App process exit not reported to DLL

(Raj)

12/26/2002 7:22:00 PM

Hi,

I am using a DLL with Application. When App is loaded or App exits
normally my DLL receives Process_Attach and Process_Detach in Dll_Main
as expected. But when App does errors like Access violation or
something, exceptions are raised or sometimes simply App exits without
notifying DLL. App exits simply with a printf "Press any key to exit"
and I have no control but simply exit from App and App exit is not
known to DLL. I use several App with same DLL and DLL's
Process_Attach, Process_Detach keeps track of number of processses
attached. When last App that uses DLL exits, DLL does some cleanup and
sends WM_DESTROY to its windows and cleanly exits. Becoz in some error
cases my App or Windows is not reporting App exit to DLL, I am unable
to do cleanup. DLL monitoring or polling App doesn't appeal.

1) Is there any good way for DLL to know App left in error other than
polling.

2) Why sometimes (in error cases ) App exits with "Press any key to
exit" even if exit is not selected by user menu. What type of errors
cause this. I appreciate any light on this. How to debug this case.

Any suggestions ?

Thanks.