program dzialal, ale po przerzuceniu funkcji (w sumie sa cztery funkcje) do bibliooteki dll dzialac przestal...
w bibliotece dll o nazwie dll.dll
function stosunek(i:integer;y:array of prog_tv):shortstring; stdcall;
(prog_tv to rekord) funkcja eksportowana jest przez nazwe;
w programie:
var myFileT:textfile;
handler: HModule;
i:integer;
p:array of prog_tv;
f_stosunek:function(i:integer;y:array of prog_tv):shortstring;stdcall;
begin
handler:=LoadLibrary('dll.dll');
if handler<>0 then
begin
f_stosunek:=GetProcAddress(handler,'stosunek');
Edit1.Text:=f_stosunek(i,p);
end;
to sa elementy kodu,ale mysle,ze elementy kluczowe..