Hah!!!! Found it... It's almost the same as Athena's example....
First off... add dynlibs to your uses clause...
Now...
[pascal]
var
Form1: TForm1;
Adress: TLibHandle; //This is very important.
implementation
procedure Method1;
begin
ShowMessage('Hello world 1');
end;
procedure Method2;
begin
ShowMessage('Hello World 2');
end;
type
TMyMethod = procedure; stdcall;
procedure TForm1.Button1Click(Sender: TObject);
var
mp: TMyProcedure;
begin
mp := TMyProcedure(GetProcAdress(Adress, 'Method1'));
mp;
end;
//This is very important, declare exports for each exported method...
exports Method1 name 'Method1';
exports Method2 name 'Method2';
end.
[/pascal]
And viola... I got it right, the GetProcAdress is in the dynlibs unit...
And I have to thank the FPC mailing lists for this...
IMO, it would be best to develop a dynamic library (*.so/*.dll) that contains the needed methods for your Game Development IDE. And then call from that.
Bookmarks