delphi finalizalization code in a DLL
- by PA
I am moving some functions to a shared DLL (I want to have some called as a Windows hook).
The actual functions are currently in a unit, and it happens to have some initialization and some finalization code.
I was initially thinking on doing a direct transformation from a unit to a library. So I moved the initialization code in between the main begin and end.. But then I realized I had no place to move the finalization code. I should create and register an special DLL entry point, instead.
My question is. Can I leave the unit with all the functions and the initialization and finalization codes and just create a library stub that uses the unit? will the finalizationit be called?