
This articles demonstrates how to write an object which returns another object. Our component (which we will call ParentChild) will host two objects, Parent and Child. The Parent object will be createable via the Server.CreateObject statement. The Child object, on the other hand, will not have a ProgID of its own. It will be created by calling Parent's method CreateChild, as follows:
Set Parent = Server.CreateObject("ParentChild.Parent") Set Child = Parent.CreateChild Child.SomeMethod
|