I can't get my vb program to implement Iobjectcontruct to pull a connection string from my COM+ services.
I followed what microsoft has to say:
Make sure your project has a reference to "COM+ 1.0 Services Type Library".
In your class module, beneath any Option statements, add the following line of code:
You may also add a private class-level variable to hold the string:
Private msConstructorString As String
In the scope list box in your code editor, where it reads "(General)", you should have a new item called IObjectConstruct. When you select it the IObjectConstruct_Construct function will be added to your class.
Add the following code to it so the function looks as follows:
Private Sub IObjectConstruct_Construct(ByVal pCtorObj As Object)
msConstructorString = pCtorObj.ConstructString
This retrieves the ConstructString and stores it in your private variable.
but it never hits the iobjectconstruct_construct sub routine.