Ich hab das jetzt so:
Delphi-Quellcode:
type UniProc = procedure(const params: Array of const );
procedure CallProc( procptr: Pointer; const paramlist: Array of const);
var
x: UniProc;
begin
x := procptr;
x(paramlist);
end;
allerdings bekomme ich die Parameter nicht korrekt zurück. Geladen werden sie so:
Delphi-Quellcode:
procedure SetTimeout(proc: Pointer;const params: Array of const; msecs: longword);
var i: integer;
begin
setlength(jobs,length(jobs)+1);
jobs[high(jobs)].proc := proc;
setlength(jobs[high(jobs)].params,length(params));
for i :=0 to high(params) do
begin
jobs[high(jobs)].params[i] := params[i];
end;
jobs[high(jobs)].launchtime := gettickcount+msecs;
end;