Funkcja w dll

0

Witam.
Może mój problem jest banalny, ale w jaki sposób umieścić w dll funkcję, a potem wywołać ją w głównym programie. Mam np. coś takiego:

function nazwa(parametr: string) : string;
begin
różne instrukcje;
Result:=Wynik;
end;

Kiedy robię jak z procedurami, to nie działa. Podpowie ktoś?

0

Szukaj.. było.. a poza tym google..

1

będę dobry.

library test;

uses sharemem;

function nazwa(parametr: string) : string;
begin
  Result:=parametr+' rulez!';
end;

exports
  nazwa;

END.
{$apptype console}

program testuj;
uses sharemem;

function nazwa(parametr: string) : string; external 'test.dll';

BEGIN
  writeln(nazwa('Ahmed'));
END.

1 użytkowników online, w tym zalogowanych: 0, gości: 1