> Serge K <gourm...@inbox.ru> hat am 4. November 2014 um 09:35 geschrieben:
>
> As I know from docs and my own experience QLibrary loads each DLL only once.
> While next load attempt it just increases usage counter. This means all DLL’s
> static data are loaded only once too. But I need allow different threads load
> each own copy of DLL with it’s own copy of static data. Otherwise all data in
> DLL become shared between threads which I do not need. I need force each
> loaded DLL copy work as “object” with it’s own static data set. Now I
> dynamically create numbered copies of DLL files but this is not elegant
> solution. Is there any way to force QLibrary load DLL from same file but to
> separate memory as it would be loaded from separate file? Important – I make
> crossplatform application, it must work in Windows and Linux at least.
>
>
> --
> Serge K
>
Hi,
i think you should look into the factory pattern.
i normally export a
ClassFromDll* createInstance();
or alike, to create distinct instances of my data from a single dll.
besides, i don't know if this is possible the way you want.
alex
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest