[fpc-pascal] importtl tool

LacaK lacak at zoznam.sk
Fri Oct 21 12:32:15 CEST 2016


Dňa 21.10.2016 o 12:10 José Mejuto napísal(a):
> El 21/10/2016 a las 12:05, LacaK escribió:
>
>> - in typelib.pas is on line 631 vt=VT_PTR and sl='PWideString' ('P' is
>> deleted on line 635) wParamFlags=0
>> When I add "else" part:
>>             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
>> /*added*/  else sPar:='var ';
>>             end;
>> it works for me.
>> But I have no idea if it can negative impact other cases ?
>
> Hello,
>
> Looking again to the code I think you are right and is the third case 
> "PARAMFLAG_FIN" which may be wrong, it should be "constref" (IN only). 
> Have you tried to use constref in the else case ?
Yes, when I use:
else sPar :=  'constref ';
Then it works for me ...

So result should be:
             case FD^.lprgelemdescParam[k].paramdesc.wParamFlags and
(PARAMFLAG_FIN or PARAMFLAG_FOUT) of
               PARAMFLAG_FIN or PARAMFLAG_FOUT:sPar:='var ';
               PARAMFLAG_FOUT:sPar:='out ';
              else sPar:='constref ';
             end;
-Laco.



More information about the fpc-pascal mailing list