Code: Select all
unit abc;
interface
const
user32 = 'user32.dll';
kernel32 = 'kernel32.dll';
procedure Test123(var a: integer);
function MessageBox(hWnd: Cardinal; lpText, lpCaption: Pchar; uType: Cardinal): Integer; stdcall;
function Func1(AParam: integer): boolean; overload;
function Func1(AParam: boolean): boolean; overload;
function Func1(AParam: byte): boolean; overload;
implementation
function Func1(AParam: integer): boolean; overload;
begin
MessageBox(0,'Header','TinyPE in Delphi',0);
end;
function Func1(AParam: boolean): boolean; overload;
begin
MessageBox(0,'Header','TinyPE in Delphi',0);
end;
function Func1(AParam: byte): boolean; overload;
begin
MessageBox(0,'Header','TinyPE in Delphi',0);
end;
procedure test123(var a: integer);
begin
a:= a + 1;
end;
function MessageBox; stdcall; external user32 name '_MessageBoxA@16';
end.
Code: Select all
unit Hello;
interface
uses
abc;
function Start(hModule, hReason, hReserved: DWORD): LongBool; stdcall;
implementation
function Start(hModule, hReason, hReserved: DWORD): LongBool;
begin
Func1(3);
Func1(True);
Result:= TRUE;
end;
end.
Code: Select all
Borland Delphi Version 15.0
Copyright (c) 1983,2002 Borland Software Corporation
hello.pas(1)
hello.pas(1)
hello.pas(1)
abc.pas(1)
abc.pas(18) Warning: Return value of function 'Func1' might be undefined
abc.pas(23) Warning: Return value of function 'Func1' might be undefined
abc.pas(28) Warning: Return value of function 'Func1' might be undefined
abc.pas(39)
hello.pas(6)
hello.pas(19)
60 lines, 0.00 seconds, 78 bytes code, 4 bytes data.
Code: Select all
Microsoft (R) Incremental Linker Version 7.00.9210
Copyright (C) Microsoft Corporation. All rights reserved.
Hello.obj : warning LNK4033: converting object format from OMF to COFF
abc.obj : warning LNK4033: converting object format from OMF to COFF
system.obj : warning LNK4033: converting object format from OMF to COFF
LINK : warning LNK4078: multiple '.text' sections found with different attributes (C0000040)
LINK : warning LNK4078: multiple '.text' sections found with different attributes (C0000040)