[Interest] Is it possible to override dll in runtime in Qt?

Vincent Cai wcai at cypress.com
Wed Apr 9 08:52:01 CEST 2014


Hi manish,

               Thanks for the reply.
               I am totally new to QPlugin and QLibrary.
               I don't quite understand your meaning.
               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?
               BTW, Core.dll is dependent on Prmt.dll, how can Core.dll know access symbols in Prmt.dll after changing Prmt.dll?

Regards,
Vincent.
From: manish sharma [mailto:83.manish at gmail.com]
Sent: Wednesday, April 09, 2014 2:42 PM
To: Vincent Cai
Cc: interest at qt-project.org
Subject: Re: [Interest] Is it possible to override dll in runtime in Qt?

i think it should work using pluginloader something like below:

QObject* getPrmt(QString path)
{
        QDir pluginsDir(path)
        QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
        return loader.instance();
}
and call getPrmt function with any of "A/Prmt.dll", "B/Prmt.dll"?

On Wed, Apr 9, 2014 at 10:34 AM, Vincent Cai <wcai at cypress.com<mailto:wcai at cypress.com>> wrote:
Dear All,

I have an Qt application, which uses 2 dll, one is Prmt.dll and the other is Core.dll. Core.dll is dependent on Prmt.dll. Prmt.dll has multiple instances in different folders, for example: A/Prmt.dll, B/Prmt.dll... The Qt application provides an option to choose Prmt.dll, so it need to override Prmt.dll in runtime. Is it possible to override dll in runtime in Qt?

Regards,
Vincent.
This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.

_______________________________________________
Interest mailing list
Interest at qt-project.org<mailto:Interest at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest

This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140409/1d921eb2/attachment.html>


More information about the Interest mailing list