I have an MFC application that needs to load a DLL dynamically. The DLL will be used to retrieve a run-time value and then be unloaded. Do I need to create an MFC DLL and load it via AfxLoadLibrary() or can I create a traditional C++ dll and use the Win32 LoadLibrary() call? Does it matter?
I have an MFC application that needs to load a DLL dynamically. The DLL
Share
It is explicitly mentioned in the Remarks section of the MSDN Library article:
So if you are loading a DLL that contains MFC code or if you using threads in your program then you should use it.
That said, at least in modern versions of MFC, AfxLoadLibrary() doesn’t do anything special:
So nothing is going to blow up badly if you guess wrong at this. Thank goodness.