AW: Early intervention in the startup of an wxApp. Possible?

Joerg Toellner toellner at oss-gmbh.de
Fri Oct 27 04:56:59 PDT 2006


Thank you c sklu for your explanations. It clears up many things for me.

Unfortunately dynamic loading isnt really an option for a xerces-like big
library. :-(

But i'll think further to extend our already in use "update our exefiles"
standalone app to do such dll things also.

Have a good time
Joerg 

-----Ursprüngliche Nachricht-----
Von: c sklu [mailto:cskludev at gmail.com] 
Gesendet: Freitag, 27. Oktober 2006 13:25
An: wx-users at lists.wxwidgets.org
Betreff: Re: Early intervention in the startup of an wxApp. Possible?

Hi Joerg,

Is it possible in your app to explicitly load the xerces library using
dlload(*nix) or LoadLibrary(Windows)? This way you can load the shared
library at runtime whenever you want to, but it also requires major
architectural considerations. Namely:

- your app wouldn't link in xerces at link time
- your xml parsing would be handled like a 'plugin"

That's the way I do things because everything is effectively a plugin
(including wxWindows itself), but don't know if there is a standard way of
doing it. I think the startup stuff before main() is pretty platform
dependent. One thing you can do is have a function called when a dynamic
library is loaded (dllmain() for Windows and _ini() or something like that
for *nix) so you could put this in another dynamic library, but then the
order of library loading is also probably not guaranteed.

HTH
Chris

On 10/27/06, Joerg Toellner <toellner at oss-gmbh.de> wrote:
> Hi Group,
>
> wxMSW 2.7.0, MSVC 2005, xerces-c 2.7, windows xp pro
>
> My app uses the xerces-c .dll to to xml-handling. I link my app with 
> the xerces.lib.
>
> No i need to automatically update my dll. So my app checks at startup, 
> if there is a newer version available on a specified place.
>
> The problem is, that when i have the chance to check/update the .dll 
> the .dll is already in use (or if the .dll is not present my app dont 
> startup anymore).
>
> Have i a chance to get a function called while my app starts BEFORE 
> the xerces.dll is loaded so i can copy over a newer one? Earlier than 
> wxApp::OnInit(). But with wx already initialised because i use some wx 
> functions to copy and read textfiles a.s.o.
>
> Dunno if it is possible what i need, but appreciate any hint from an
expert.
>
> TIA
> Joerg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wx-users-help at lists.wxwidgets.org







More information about the wx-users mailing list