I have a plug-in application which is a C++ DLL running inside a (foreign) C++ host.
I want to allow online updates of the plug-in.
How can I do that?
One possible way is to separate the DLL to a wrapper DLL and a content DLL and
to move to a new content DLL on each update.
Is there any better way to achieve that?
Thanks
If you have no control over the host, then you have to do the dynamic load/unload on your own. As you correctly noticed, you will need two DLLs for this. That’s probably the easiest way, but you need to make sure that the host cannot do any harm while you are exchanging the DLLs. The simplest solution is probably to load both DLLs and then perform an atomic switch between them before unloading the old code.