Reputation: 779
I am facing one problem with implicitly linked dll. I have one application written in C++ which is implicitly linked to dll. After particular number of iteration, the dll functions do not work as per expectations. I want to reload this dll so that the freshly loaded dll work properly. The problem is that since the dll is linked implicitly to the application, I am not able to reload the dll during runtime. Is there any way so that the implicitly linked dll can reload again? Thanks in advance.
Upvotes: 2
Views: 2465
Reputation: 1048
I'm facing the same issue. What I did is that I created an interface class. The class that implements the interface loads the dll in its constructor (LoadLibrary), and unloads it on the destructor (FreeLibrary).
A quick note: This approach is working fine with Visual Studio 2008, but for some reason, it's not working with visual studio 98
Upvotes: 2
Reputation: 612954
You cannot force a re-load of an implicitly linked DLL. You will need to use explicit linking.
Upvotes: 2