O'Reilly logo

Microsoft® Visual Basic® .NET Programmer's Cookbook by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Create a COM+ Serviced Component

Problem

You want to create a component that can use COM+ services such as distributed transactions and object pooling.

Solution

Derive your component from the ServicedComponent class, give your assembly a strong name, and register it in the COM+ catalog using the regsvcs.exe utility.

Discussion

To use COM+ services (as described in recipes Create a Pooled Component and Use a COM+ Distributed Transaction), you must create your component as a class library assembly and add a reference to the System.EnterpriseServices.dll assembly. You can then add one or more classes that derive from System.EnterpriseServices.ServicedComponent. These classes do not need any additional COM-specific code. They gain the ability to use a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required