Jump to content
Robert Gilland

Safe Array Definition inside Type LIbrary Editor

Recommended Posts

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×