Robert Gilland 5 Posted May 9 I am using Delphi 10.2. How do I define an array of records in the type library editor? Share this post Link to post
David Champion 48 Posted May 10 Not directly answering your question.. More Automation In Delphi, Collections - Brian Long Share this post Link to post
PeterBelow 238 Posted May 10 On 5/9/2024 at 8:23 AM, Robert Gilland said: I am using Delphi 10.2. How do I define an array of records in the type library editor? Is this for defining a method parameter? I think you have to define it as SAFEARRAY[VARIANT] (perhaps the syntax is SAFEARRAY(VARIANT), do not remember) in the code editor part, that is: in the ridl file. The type library editor only offers long as the element type for a safearray parameter. The server would have to construct a safearray with variants of type VT_RECORD. I have never worked with such user-defined types in COM applications, but from the docs it looks to be horribly convoluted, to say the least... As far as I know Delphi's support for OLE Variants does not include anything for UDTs, you would have to implement the necessary details in your own code. Share this post Link to post