[Interest] Is it possible to override dll in runtime in Qt?
Thiago Macieira
thiago.macieira at intel.com
Wed Apr 9 16:34:26 CEST 2014
Em qua 09 abr 2014, às 06:52:01, Vincent Cai escreveu:
> With your method below, can I load A/Prmt.dll then unload
> A/Prmt.dll and then load B/Prmt.dll in runtime without restarting
> Application?
Not a good idea. Unloading plugins is not recommended. Simply restart the
application if you need to change plugins.
Also, QPluginLoader needs to load something that is a Qt plugin. A generic DLL
does not qualify. You'd need to use QLibrary directly or, better yet, Win32
LoadLibrary.
> BTW, Core.dll is dependent on Prmt.dll, how can Core.dll know
> access symbols in Prmt.dll after changing Prmt.dll?
You have to unload Core.dll too. Hence, please use LoadLibrary for both DLLs
and unload them both when you're done.
And cross your fingers.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list