importtl and ignored [out, retval] parameters

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

importtl and ignored [out, retval] parameters

Lubos Pintes
Hello,
I wanted to import the UIAutomationClient type library. Thus I compiled
the UIAutomationClient.idl to .tlb and then used importtl to convert it
to pascal.
Importtl converted this incorrectly, it ignored [out, retval] parameters
on many places. For example, two examples from IUIAutomationElement
interface.
IDL:
         HRESULT GetRuntimeId (
             [out, retval] SAFEARRAY(int) * runtimeId );

         HRESULT FindFirst (
             [in] enum TreeScope scope,
             [in] IUIAutomationCondition * condition,
             [out, retval] IUIAutomationElement ** found );

Pascal:
     // GetRuntimeId :
    function GetRuntimeId:HRESULT;stdcall;
     // FindFirst :
    function
FindFirst(scope:TreeScope;condition:IUIAutomationCondition):HRESULT;stdcall;


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: importtl and ignored [out, retval] parameters

LacaK
Hi,
probably related also to https://bugs.freepascal.org/view.php?id=30764
(but this my report is mostly about pointer parameters where NO
DIRECTION is specified)
-Laco.

> Hello,
> I wanted to import the UIAutomationClient type library. Thus I
> compiled the UIAutomationClient.idl to .tlb and then used importtl to
> convert it to pascal.
> Importtl converted this incorrectly, it ignored [out, retval]
> parameters on many places. For example, two examples from
> IUIAutomationElement interface.
> IDL:
>         HRESULT GetRuntimeId (
>             [out, retval] SAFEARRAY(int) * runtimeId );
>
>         HRESULT FindFirst (
>             [in] enum TreeScope scope,
>             [in] IUIAutomationCondition * condition,
>             [out, retval] IUIAutomationElement ** found );
>
> Pascal:
>     // GetRuntimeId :
>    function GetRuntimeId:HRESULT;stdcall;
>     // FindFirst :
>    function
> FindFirst(scope:TreeScope;condition:IUIAutomationCondition):HRESULT;stdcall;
>
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal