Boost logo

Boost :

From: Roland (roland.schwarz_at_[hidden])
Date: 2004-07-23 06:56:04


Sorry for breaking into this discussion.

> > When a DLL is opened, Windows will implicitly call the exported
> > initialization function. Whether or not your compiler uses this to run
> > static initializers is up to the compiler vendor.
>
> Understood. What happens in practice, say on VC?

This is the responsibility of the C-Runtime library. The static constructor
list is getting called from the
_DllMainCRTStartup
which is the "true" entry point of the DLL. DllMain is getting called then in turn
from within _DllMainCRTStartup.

( Please also note that DllMain is called BEFORE the runtime library has been
initialized!)

Roland


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk