[Qt-interest] Loading Qt Shared from DLL

Marco Borm qt-lists at retrodesignfan.eu
Wed Aug 26 00:45:50 CEST 2009


Hi,

maybe a wrapper plugin which uses SetDllDirectory() or 
SetEnvironmentVariable() to add the qt libraries directory to the search 
order is a way. After this the plugin loads the real plugin dynamically.
Unfortunately this can result in unexpected side affects for other 
plugins or the application itself.


Marco


Finley Lee wrote:
>
> I’m creating a Photoshop plug-in on the Windows platform which I’d 
> like to use Qt with. The plug-in is a DLL which is installed in a 
> different folder from the application that loads it. I would like to 
> use the shared library version of Qt, but I can’t figure out how to 
> get my plug-in to load the Qt DLLs when they are installed in the same 
> folder as my plug-in.
>
> I could put the Qt DLLs in Photoshop’s application folder, in the 
> system directory, or the Windows directory, but this seems like an 
> invitation for them to be overwritten by an installer for another product.
>
> Is there a way to have the Qt DLLs get loaded from my plug-ins folder, 
> or will I need to use the static version of Qt?
>
> Thanks!
>
> -Finley
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   




More information about the Qt-interest-old mailing list