![]() |
Meine erste DLL / Freigeben / Unload ?
Hi, hab da mal ne' Frage... :-D
Bin gerade dabei meine erste DLL zu basteln. In der DLL ist eine Form, die ich aus der App aufrufe (Form ist Showmodal). Läuft alles so, aaaaber muss man in der App die DLL wieder irgend wie freigeben, oder ist das falsch wie ich das mache ? In der App:
Delphi-Quellcode:
Die DLL:
...
Function ViewInfoDll : Integer; stdcall; external 'Info.Dll'; ... implementation ... procedure TForm1.Button1Click(Sender: TObject); begin try ViewInfoDll; // Aufruf der Form aus Dll except on E: Exception do begin Application.MessageBox(pchar('Fehler beim Aufruf der DLL: ' + E.Message ),'Upps !', MB_ICONERROR + MB_OK); end; end; end;
Delphi-Quellcode:
Danke im voraus!
...
function ViewInfoDll : Integer; stdcall; ... Function ViewInfoDll : Integer; Begin DLLInfoForm := TDLLInfoForm.Create(Application); DLLInfoForm.ShowModal; DLLInfoForm.Free; Result := 0; End; ... |
Re: Meine erste DLL / Freigeben / Unload ?
Da du statische Einbindung gewählt hast passiert das automatisch... kannst du ja auch so gar net wenn du kein Instanzhandle der DLL hast :)
diese Frage stellt sich erst beim dynamischen Einbinden von DLLs... Greetz Boombuler |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:00 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz