[fpc-pascal] importtl tool
LacaK
lacak at zoznam.sk
Thu Oct 20 15:20:04 CEST 2016
Dňa 20.10.2016 o 14:05 José Mejuto napísal(a):
> El 20/10/2016 a las 11:09, LacaK escribió:
>> Hi,
>>
>> I have noticed, that tool for importing type library into pas
>> incorrectly imports interface methods, which should have "var"
>> parameter.
>>
>> For example in my case imported:
>> function
>> ScGetStringValue(Type_:Integer;Value:WideString):Integer;dispid 33;
>> but it should be:
>> function ScGetStringValue(Type_:Integer;var
>> Value:WideString):Integer;dispid 33;
>>
>> I think, that it is bug as far as delphi imports same type library with
>> "var".
>>
>> Has somebody similar experience?
>
> Hello,
>
> I had fixed some of this bugs in:
>
> http://bugs.freepascal.org/view.php?id=27486
>
> And my patch was applied with small modification (as noted by Michael
> Van Canneyt) and I'm not sure if this modification alters the "var"
> inclusion in some fields.
IMO this is not my case. As I see in your patch these lines are about
property setter "procedure Set_..." but I have error in "INVOKE_FUNC"
branch (about line 640-650) ...
There is:
if bParamByRef then
case FD^.lprgelemdescParam[k].paramdesc.wParamFlags and
(PARAMFLAG_FIN or PARAMFLAG_FOUT) of
PARAMFLAG_FIN or PARAMFLAG_FOUT:sPar:='var ';
PARAMFLAG_FOUT:sPar:='out ';
PARAMFLAG_FIN:sPar:='var '; //constref in safecall? TBD
end;
In my case bParamByRef = True, but wParamFlags=0 so no "var" nor "out"
is added ...
(as I do no known about type libraries I fear, that any modification
which fixes my case can cause problems in another cases)
So I have posted bug report:
http://bugs.freepascal.org/view.php?id=30764 may be somebody experienced
can fix it ...
Thanks
-Laco.
More information about the fpc-pascal
mailing list