Using an Object Constructor String to Construct a Component

The following example illustrates how to programmatically retrieve and use an object constructor string when a component is instantiated. It shows an implementation of the IObjectConstruct interface that retrieves an object constructor string. The string can then be parsed to set initial values or influence the behavior of the component.

Visual Basic

Implements IObjectConstruct
Private Sub IObjectConstruct_Construct( ByVal pCtorObj As Object )
    Dim strConstructorString As String
    strConstructorString = pCtorObj.ConstructString
     Parse and use strConstructorString here. 
End Sub

COM+ Object Constructor Strings Concepts

Specifying an Object Constructor String for a Component