Fixing the "Could not call proc" #232
This commit is contained in:
pjrobin 2022-03-02 21:24:10 +01:00 committed by GitHub
parent 964d957d3f
commit 5f33baadd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,6 +64,8 @@ begin
btClass: Arg := TValue.From<TObject>(TObject(fvar.dta^)); btClass: Arg := TValue.From<TObject>(TObject(fvar.dta^));
btRecord: Arg := TValue.From<Pointer>(fvar.dta); btRecord: Arg := TValue.From<Pointer>(fvar.dta);
btStaticArray: Arg := TValue.From<Pointer>(fvar.dta); btStaticArray: Arg := TValue.From<Pointer>(fvar.dta);
btVariant:
Arg := TValue.From(Variant(fvar.dta^));
btArray: btArray:
begin begin
if Copy(fvar.aType.ExportName, 1, 10) = '!OPENARRAY' then if Copy(fvar.aType.ExportName, 1, 10) = '!OPENARRAY' then
@ -185,6 +187,10 @@ begin
Break; Break;
end; end;
end; end;
btVariant:
begin
PVariant(res.dta)^ := Invoke(Address, Args, SysCalConv, TypeInfo(Variant), False, IsConstr).AsVariant;
end;
{$ENDIF} {$ENDIF}
else else
// writeln(stderr, 'Result type not implemented!'); // writeln(stderr, 'Result type not implemented!');