From 67d307293e444b01727b5a44dcf1595ae9569e23 Mon Sep 17 00:00:00 2001 From: evgeny-k Date: Thu, 26 Sep 2024 14:38:53 +0300 Subject: [PATCH] #241: Param with type "array of const" doesn't work --- Source/InvokeCall.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/InvokeCall.inc b/Source/InvokeCall.inc index 7fe683f2..a17ca422 100644 --- a/Source/InvokeCall.inc +++ b/Source/InvokeCall.inc @@ -1,3 +1,4 @@ +type pTbtString = ^TbtString; function PSVariantIFCToTValue(aValue: PPSVariantIFC; var aValues: TArray): Boolean; var l_len: Integer; @@ -10,9 +11,9 @@ begin case aValue^.aType.BaseType of {$IFNDEF PS_NOWIDESTRING} btWidestring, - btUnicodestring, + btUnicodestring: aValues := aValues + [TValue.From(pstring(aValue^.dta)^)]; {$ENDIF} - btString: aValues := aValues + [TValue.From(pstring(aValue^.dta)^)]; + btString: aValues := aValues + [TValue.From(pTbtString(aValue^.dta)^)]; btU8, btS8: aValues := aValues + [TValue.From(pbyte(aValue^.dta)^)]; btU16, BtS16: aValues := aValues + [TValue.From(pword(aValue^.dta)^)]; btU32, btS32: aValues := aValues + [TValue.From(pCardinal(aValue^.dta)^)]; @@ -25,8 +26,7 @@ begin btClass: aValues := aValues + [TValue.From(TObject(aValue^.dta^))]; btRecord: aValues := aValues + [TValue.From(aValue^.dta)]; btStaticArray: aValues := aValues + [TValue.From(aValue^.dta)]; - btVariant: - aValues := aValues + [TValue.From(Variant(aValue^.dta^))]; + btVariant: aValues := aValues + [TValue.From(Variant(aValue^.dta^))]; btArray: begin if Copy(aValue^.aType.ExportName, 1, 10) = '!OPENARRAY' then begin @@ -226,6 +226,6 @@ begin Exit; end; { case } end; //assigned(res) - + SetLength(Args, 0); Result := True; end;