C# DLL: Need to know when application is closing

Posted by Nick on Stack Overflow See other posts from Stack Overflow or by Nick
Published on 2010-06-10T06:43:40Z Indexed on 2010/06/10 6:52 UTC
Read the original article Hit count: 244

Filed under:
|
|
|
|

Is there a way to monitor when an application that is using the dll closes? The DLL and the application are both C#, neither are Windows Forms.

I can check when the main application is closing, but I would like for the DLL to see "hey the program is closing and releasing me, I should do this real quick before I die".

Any way to do it? Or am I stuck having the application dish out "do this before you die"?

© Stack Overflow or respective owner

Related posts about c#

Related posts about dll