Dll_Process_Attach_Hook is never called
Original Reporter info from Mantis: PascalDragon @PascalDragon
-
Reporter name: Sven Barth
Original Reporter info from Mantis: PascalDragon @PascalDragon
- Reporter name: Sven Barth
Description:
When I assign a custom function to Dll_Process_Attach_Hook in an initialization section or the library's main procedure, my method is never called.
This is because Dll_Process_Attach_Hook is checked inside DllEntry BEFORE PascalMain is called, where all units are initialized.
Solution: Remove that hook completely. It is not needed, because the main method fulfills the purpose of a DLL_PROCESS_ATTACH handler.
Additional information:
As this issue exists on all three windows plattforms (win32, win64, wince), the attached patch also removes the hook on all three targets.
Mantis conversion info:
- Mantis ID: 15014
- OS: Win32
- OS Build: NT 6.0 (Vista)
- Platform: i386
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 14094 (#1cf64c03)
- Target version: 3.0.0