|
|
|
Having a VB6 component support a COM+ construction string requires that you implement the IObjectConstruct interface and its only method, Construct. The .NET ServicedComponent class implements this interface internally and expose the Construct method as a protected, overridable method. Thus your VB.NET component can learn what constructor string has been passed to it in a very simple way: |
Click here to copy the following block | Imports System.EnterpriseServices
Public Class BankTransfer Inherits ServicedComponent
Protected Overrides Sub Construct(ByVal s As String) End Sub End Class |
The Construct method is automatically invoked after the constructor method, provided that the "Enable object constructor" option is selected in the component's Activation tab. To ease the installation step you can decorate the class with a ConstructionEnabled attribute, so that this option is automatically selected when the component is imported in a COM+ application: |
The constructor string passed in the attribute is used to provide a default string for the corresponding field in the Activation tab, but in most cases it will be overwritten after the component is imported in the COM+ application. After the component has been imported, this attribute has no effect.
|
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|