Software Archive
Read-only legacy content
17060 Discussions

Nested COM objects

Intel_C_Intel
Employee
1,590 Views
I get this impression that there is no shortcut method of drilling down through a COM object tree, am I correct? Do I have to first retrieve the object pointer for each sub-object then use that pointer to get the properties and methods of the sub-object?

e.g. in VB you'd do:

TopObject.Collection(1).SubObject.Name

in C++:

TopObject->Collection(1)->SubObject->Name

in FORTRAN must I do (pseudo-code):

pntrOne = TopObject (CreateCOMObjectBY...)
pntrTwo = TopObject_GetCollection (pntrOne)
pntrThree = Collection_GetSubObject(pntrTwo, 1)
name_var = SubObject_GetName(pntrThree, Name)
0 Kudos
1 Reply
Intel_C_Intel
Employee
1,590 Views
> I get this impression that there is no shortcut method of drilling down through a COM object tree, am I correct?

Yes, Dan, you are correct.

Leo
0 Kudos
Reply