[fpc-pascal] Re: TProcess.Free - three exceptions in ntdll.dll	- only *sometimes*
    Sven Barth 
    pascaldragon at googlemail.com
       
    Wed Oct  6 09:37:33 CEST 2010
    
    
  
Am 05.10.2010 21:08, schrieb Bernd Kreuss:
> On 05.10.2010 20:55, Bernd Kreuss wrote:
>> I see this error message now exactly once, immediately *after* the DLL
>> has been unloaded by the host application.
>
> Correction: I see it after my log output within my finalization section,
> it might still be in the final stages of DLL_PROCESS_DETACH.
>
> Where exactly is the finalization (the finalization section in my source
> code) hooked into? is it Dll_Process_Detach_Hook?
If I remember correctly, yes. Search for "fpc_do_exit" in the rtl/ 
directory (and the methods called from there).
On a sidenote: The critical section should not be necessary, because 
DllMain is called serialized by the OS (according to 
http://blogs.msdn.com/b/oldnewthing/archive/2004/01/28/63880.aspx ).
Regards,
Sven
    
    
More information about the fpc-pascal
mailing list