I am sorry but if this is already answered just give me the link
Here is my problem:
I am trying to make a DLL that uses windows forms (in c++). I managed to make the dll and it is working, the issue is that the DLL does not unload from the process when I exit the window!!
In normal c++, I just need to call FreeLibraryAndExitThread(hModule,0); to exit the thread and free the DLL from the main process, but with windows forms I don't know when to call such a function in order to exit properly...
Here is my source code, I will really appreciate your help







