Mam sobie bibliotekę o takim kodzie:
library FSD;
uses
SysUtils,
System,
Graphics,
Windows,
Forms,
Classes;
procedure StartFullScreenMode(ScreenColor : TColor);stdcall;
var
X,Y : Integer;
begin
repeat
SetPixel(0,X,Y,ScreenColor);
X := X + 1;
if X = Screen.Width then
begin
X := 0;
Y := Y + 1;
end;
until Y = Screen.Height;
end;
exports
StartFullScreenMode;
begin
end.
Jak chcę ją dynamicznie wywołać, to nie chce mi jej znaleźć... Co zrobić?
Oto kod wywołujący
var
DLL : THandle;
FSS : Procedure;
begin
LoadLibrary('FSD.dll');
try
@FSS := GetProcAddress(DLL, 'StartFullScreenMode'); // laduj procedure
if @FSS = nil then raise Exception.Create('Bład - nie mogę znaleźć proceudry w bibliotece!');
FSS; // wywolaj procedure
finally
FreeLibrary(DLL); // wreszcie zwolnij pamiec
end;
end;