Einzelnen Beitrag anzeigen

BerndS

Registriert seit: 8. Mär 2006
Ort: Jüterbog
480 Beiträge
 
Delphi 11 Alexandria
 
#14

Exe als DLL verwenden.

  Alt 3. Apr 2017, 13:55
@Neutral General

Ich habe hier ein einfaches Projekt um das zu testen.
Delphi-Quellcode:
program ExeAsDLL;

uses
  WinApi.Windows,
  Vcl.Forms,
  Unit1 in 'Unit1.pas{Form1};

{$R *.res}
procedure ShowDocument; stdcall;
begin
  WinApi.Windows.MessageBox(0, 'ShowDocument', 'ExeAsDLL', MB_ICONINFORMATION or MB_OK);
end;

exports ShowDocument;

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.
Der Test erfolgt mit:
rundll32 ExeAsDLL.exe ShowDocument
Unter Windows 7 kommt die bekannte Meldung Programm funktioniert nicht mehr unter W10 wird nichts angezeigt.
Gruß Bernd
Bernd
  Mit Zitat antworten Zitat