Composite objects VaryDisp object
ProgID-s and ClassID-s 

VaryDisp object is the manager object for the actual composite object. Through its members the application can add objects to the composite, expose their members through it (under specified names and DISPIDs) etc. When created VaryDisp automatically creates an "empty" composite and prepares it for management.

So the VaryDisp object is responsible for dynamic composite construction. Predefined composite objects can be created through the VaryDispCreator object or using the typical COM object creation techniques if the composite is registered with the system. Furthermore VaryDispCreator allows the application to create a predefined composite and obtain the VaryDisp (manager object) for it instead of the object itself. This would be useful for applications that need to modify the created object - e.g. the object has some base/initial features but the application will want extend them dynamically.

COM notes (important for pure autorun applications)

There is no strictly defined requirement for the composite objects but their functionality depends on the objects used to create them. Therefore it is important to create them under conditions where all of their components will work properly. So if the objects used in a composite require single-threaded apartment the composite should be created in such an COM apartment. As the newobjectspack1.dll registers composite related classes as apartment this requirement will be automatically met if the DLL is installed. However you will need to take care about the COM conditions yourself if you use the DLL in non-installed mode - for example from a pure autorun ALP application. In such case the best way to guarantee the composite will be created in a single-threaded COM apartment is to use the COMApartment object and create the composite there.

Name Description
AddMember Exposes a member of an already added object
AddObject Adds an object to the composite
Clear Clears the composite
ContextName Sets/gets the name for the context object
MemberCount Exposed members count
ObjectCount Count of the objects in the composite

ObjectID

Returns an object ID by object name or index
Objects Returns a reference to an object from the composite
RemoveMember Removes an exposed member
RemoveObject Removes an object from the composite
theObject Returns a reference to the composite object
newObjects Copyright 2001-2006 newObjects [ ]