[fpc-pascal] importtl tool
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ó:
>> I have noticed, that tool for importing type library into pas
>> incorrectly imports interface methods, which should have "var"
>> For example in my case imported:
>> 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
>> Has somebody similar experience?
> I had fixed some of this bugs in:
> 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) ...
if bParamByRef then
case FD^.lprgelemdescParam[k].paramdesc.wParamFlags and
(PARAMFLAG_FIN or PARAMFLAG_FOUT) of
PARAMFLAG_FIN or PARAMFLAG_FOUT:sPar:='var ';
PARAMFLAG_FIN:sPar:='var '; //constref in safecall? TBD
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 ...
More information about the fpc-pascal