Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi DLLs (https://www.delphipraxis.net/70957-dlls.html)

NicoDE 7. Jun 2006 11:51

Re: DLLs
 
Show ist TForm1.Show. Nenn die Prozedur anders.

ByStones2 7. Jun 2006 11:53

Re: DLLs
 
Zitat:

Zitat von NicoDE
Show ist TForm1.Show. Nenn die Prozedur anders.

jetzt sagt er, er kann das nicht finden !!!
Wenn ich Button1.Caption := '...';
machen, dann geht das auch nicht !!!
Zitat:

[Error] rechnen.dpr(27): E2003 Undeclared identifier: 'showmessage'
wenn ich den befehl umbenenne

NicoDE 7. Jun 2006 11:55

Re: DLLs
 
Ich meinte, dass du die Funktion in der DLL umbenennen solltest (zum Beispiel 'show' -> 'Test').

Edit: Die Funktion ShowMessage ist in der Unit Dialogs deklariert (muss in in uses-Liste aufgenommen werden).

ByStones2 7. Jun 2006 11:57

Re: DLLs
 
Zitat:

Der Prozendureinsprung 'tset' wurde in der 'rechen.DLL' nicht gefunden.
Tja geht nicht

Wenn ich schowmessage bei uses in der DLL reinschreibe:
Zitat:

[Fatal Error] rechnen.dpr(16): F1026 File not found: 'ShowMessage.dcu'
Zitat:

Zitat von Luckie
Die Unit, in der die Funktion ShowMessasge deklariert ist, heißt dialogs.pas.

Wie muss das aussehen:
DLL:
Delphi-Quellcode:
library rechnen;

{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }

uses
  SysUtils, Classes, Messages, dialogs;

{$R *.res}


function addiere(zahl1, zahl2: integer): integer; stdcall;
begin
  result := zahl1+zahl2;
end;

procedure test; stdcall;
begin
showmessage('hi!');
end;

exports
  addiere,
  test;

begin

end.
dann kommt der Error:
[Fatal Error] F2039 Could not create output file 'rechnen.dll'

Luckie 7. Jun 2006 11:59

Re: DLLs
 
Die Unit, in der die Funktion ShowMessasge deklariert ist, heißt dialogs.pas.


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:19 Uhr.
Seite 2 von 2     12   

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-2025 by Thomas Breitkreuz