Autor Beitrag
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Sa 18.10.03 11:28 
Hi,

Wer kann die kleinstmögliche Delphi EXE erzeugen,
welche eine "Hello World!" Messagebox anzeigt?

Wer schafft 3 KB?
Shark
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 87

98, XP
D3, D5, D7
BeitragVerfasst: Sa 18.10.03 12:24 
In dem Du nicht mit der VCL arbeitest und die Win32API benutzt. Wenn Du Konstanten brauchst lege sie Dir direkt an und hol sie nicht aus irgendwelchen Units. Auch die Funktionen kannst Du dir direkt aus den Dll's holen.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 18.10.03 13:23 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
program MiniApp;

const
  CAPTION = 'Useless MiniApp';
  TEXT = 'Hello World.';

const
  MB_ICONINFORMATION = $00000040;

type
  HWND = THandle;
  UINT = LongWord;

function MessageBox(hWnd: HWND; lpText, lpCaption: PChar; uType: UINT): Integer;
  stdcall; external 'user32.dll' name 'MessageBoxA';

begin
  MessageBox(0, TEXT, CAPTION, MB_ICONINFORMATION);
end.

Ungepackt 8 KB unter D6. Mit niedrigeren Delphi Versionen könnte sie noch kleiner werden.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Sa 18.10.03 16:55 
Mit eigenen SysInit und System Units wirds dann noch kleiner...

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 18.10.03 17:50 
Jupp, hat Nico mal gemnacht. Aber das ist dann doch etwas overkill. :roll:
toms Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Sa 18.10.03 17:56 
Zitat:
Jupp, hat Nico mal gemnacht.


Meinst du das hier?

www.virustrading.com.../delphi/MiniDExe.rar


Interessant ist auch acl:

www.virustrading.com...itron/delphi/acl.rar
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 18.10.03 18:10 
MiniDexe ist nicht von Nico. Steht zwar kein CopyRight drin, aber er hatte das Icon noch binär im SourceCode drin. :mrgreen:
toms Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Sa 18.10.03 18:15 
Zitat:
MiniDexe ist nicht von Nico


Es steht zwar auf obiger Seite, dass es von Nico ist.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 18.10.03 19:00 
Hm, eventuell ein anderer. Also NicoDE (Bendlin) hätte ein Copyright reingemacht.