The code in the blocks initialization sections in the DLL will execute when the DLL is first loaded into the process. Finalization sections start when the DLL is unloaded from the process.
Eugene is right that you can have a finer-grained control using DLLProc, but this is usually only necessary for stream resources, for example. local stream storage.
, , DLLMain, , , , / , . MSDN , - , . , kernel32. !
, , MSDN DLLMain, , Microsoft DLL.
, MSDN, , , DLL. , DLL. comctl32.dll , . InitCommonControlsEx.
. . , . , / .
, , , .