Link to home
Start Free TrialLog in
Avatar of jonnyfive
jonnyfive

asked on

COM & Arrays

Hi everyone...

I used the Type-Library editor to create simple record, which includes two widestrings. I want to use this record in an property which has an array. Normal Delphi code would look like this:

property Attachments[Nr : Integer] : RAttachment read GetAttachments write SetAttachments;

How can I do this?

Regards, Jonny...
Avatar of Lischke
Lischke

Hi Jonny,

I have no glue so I cannot help you but I would like to know this myself.

Ciao, Mike

PS: I it at all allowed to have array properties in COM objects?
Shouldn't that read "I have no clue..." ? (not my native language, sorry :-)).

Ciao, Mike
Hmm... Can't you compile it the way you wrote it in your question? What does the compiler say? Perhaps I didn't understand the question?   :-))

Regards, Madshi.
I don't think you can have an array for a property.

John.
Please show us the record definition...
ASKER CERTIFIED SOLUTION
Avatar of Lischke
Lischke

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Does your record definition show up in the list of available types (dropdown boxes) in the type-lib editor ?

I assume that records should be passed by reference, you may need to add an asterisk (*) to the end of the definition...

Regards
Avatar of jonnyfive

ASKER

Hi Lischke...

yes I can and just did :-) Thanks for the help...

Regards, Jonny...
:-) fine, I've learned something new too...