Free the loaded dll
-
I have an MFC Extension DLL and I load it into memory using LoadLibrary function. Then I call a method of this dll, which creates a modeless dialog. My problem is I would like to free this dll when the user closes the dialog. But I am not sure how to do this. Do I have to unload a dll from the main program or can I unlod the dll from within the dll itself. If I have to unload it from the main program how can I notify the main program. Thank you Orcun Colak
-
I have an MFC Extension DLL and I load it into memory using LoadLibrary function. Then I call a method of this dll, which creates a modeless dialog. My problem is I would like to free this dll when the user closes the dialog. But I am not sure how to do this. Do I have to unload a dll from the main program or can I unlod the dll from within the dll itself. If I have to unload it from the main program how can I notify the main program. Thank you Orcun Colak
-
I have an MFC Extension DLL and I load it into memory using LoadLibrary function. Then I call a method of this dll, which creates a modeless dialog. My problem is I would like to free this dll when the user closes the dialog. But I am not sure how to do this. Do I have to unload a dll from the main program or can I unlod the dll from within the dll itself. If I have to unload it from the main program how can I notify the main program. Thank you Orcun Colak
Be carefull here: if your DLL is proper Extension DLL and you are unloading it from memory: As I recall, MFC doesn't have proper cleanup in this case: pointer to one of your DLL classes may still be registered in main EXE linked list. So, check this out: I just recall having alot of troubles related to this. Maybe MFC has been fixed since then though. "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me