Capturing Process Detach inside Class Library

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
I have written a C# class library which is wrapped by a VC++ dll and called by a VB 6.0 application.
In a VC++ dll i can capture when the process is getting detached from the dll (inside DllMain inside case: DLL_PROCESS_DETACH) and then can handle further processing that is required.
How can can do the same thing inside a C# Class Library (DLL) ? I want to know when the dll loading process is detaching itself from the DLL (or exiting).
I tried with the Dispose function with no luck.
Thanks. <hr class="sig A for apple, B for boy, C for c++

View the full article
 
Back
Top