Delphi 2
Простой пример DLL
Вот ДЕЙСТВИТЕЛЬНО простейшая Delphi 2.0 DLL:
library MyDll;
uses
Windows;
function SomeFunc(I: Integer): Integer; stdcall;
begin
if Odd(I) then Result := 3 * I + 1
else Result := I div 2;
end;
exports
SomeFunc;
begin
end.
|
И вот модуль импорта, который вы можете включить в любой проект, которому необходим доступ к функциям DLL:
unit MyDllImport;
interface
uses
Windows;
function SomeFunc(I: Integer): Integer; stdcall;
implementation
function SomeFunc; external 'mydll.dll';
end.
|
-Steve Schafer [000948]