Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Library: Internet / LAN / ASP.NET (https://www.delphipraxis.net/23-library-internet-lan-asp-net/)
-   -   Delphi TWebModule.OnDestroy in D6 triggern (https://www.delphipraxis.net/32051-twebmodule-ondestroy-d6-triggern.html)

Sanchez 18. Okt 2004 07:52


TWebModule.OnDestroy in D6 triggern
 
Mir ist vor kurzem aufgefallen, dass in D6 kein OnDestroy-Event triggert, wenn ich meine Apache-DSO's beende. Dazu kommt ins dpr-File dieser Code:

Delphi-Quellcode:
uses ..., windows;

procedure DLLHandler(Reason: Integer);
var
  P: procedure;
begin
  if Reason = DLL_PROCESS_DETACH then // Indicates that the library is detaching from the address space of the calling process as a result of a clean exit or a call to FreeLibrary or (dlclose on Linux).
  begin
    while ExitProc <> nil do
    begin
      @P := ExitProc;
      ExitProc := nil;
      P;
    end;
  end;
end;

begin
  DllProc := DLLHandler;
  ....
end;
grüße, daniel


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:31 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz