Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-05

importtl and ignored [out, retval] parameters

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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;

Reply by email

LacaK
to Lubos Pintes

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.

Show quoted text 27 lines
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 - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email