From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4fd79a550e1a2b09 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-28 11:16:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!212.97.174.175!not-for-mail From: Jano Newsgroups: comp.lang.ada Subject: Re: GNAT, Windows, DLLs Date: Wed, 28 May 2003 20:14:39 +0200 Message-ID: References: <3ED4FA4D.C8823BB8@alfred-hilscher.de> NNTP-Posting-Host: 212.97.174.175 X-Trace: fu-berlin.de 1054145762 5595967 212.97.174.175 (16 [49872]) X-Newsreader: MicroPlanet Gravity v2.50 Xref: archiver1.google.com comp.lang.ada:37929 Date: 2003-05-28T20:14:39+02:00 List-Id: Robert A Duff dice... > Alfred Hilscher writes: > > > I have the follwing problem: In gnat_ug it is said, that the code has to > > call _ada_initialize first and _ada_finalize at last. But - my DLL shall > > replace an existing third party DLL. So the applications using this DLL > > are not Ada-aware, and there is no way to tell them "hey the DLL is > > replaced, you have to call now an initialize-procedure first, and you > > must call this finalize-procedure at the end". So is there a way to make > > this initializing/finalizing transparent? > > I don't know. Surely there's some way to attach initialization code to > a DLL? I don't remember the details, but I've done it in the past. DLLs have such initialization/finalization entry points, called if present automatically by the OS, and there is the best place to place these procedure calls.