O'Reilly logo

COM+ Programming with Visual Basic by Jose Mojica

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

COM+ Administration Components

It is possible to administer a COM+ application through code. The code can be in a C++ client, a VB client, or even a VBScript or JavaScript client. To administer COM+ applications through code, you use the COM+ Administration Components. The first step in using these components in a VB client program is to reference the type library: choose Project References and then select COM+ 1.0 Admin Type Library from the dialog box.

The type library contains definitions of three coclasses: COMAdminCatalog, COMAdminCatalogCollection, and COMAdminCatalogObject. Each of these coclasses has a default interface: ICOMAdminCatalog, ICatalogCollection, and ICatalogObject, respectively. COMAdminCatalog is the main component—this is the component you use to accomplish most of the administrative tasks. From COMAdminCatalog, you can request certain collections. When you ask for a collection through the GetCollection method in ICOMAdminCatalog, it returns a reference to an ICatalogCollection interface (the default interface of COMAdminCatalogCollection). You can then use the ICatalogCollection interface to navigate through the collection. To use a certain item in the collection, you call the Item method in the ICatalogCollection interface; that method returns a reference to the ICatalogObject interface. You can then use the ICatalogObject interface to set properties for an individual item in the collection.

Creating a COM+ Application

The following code fragment first ...

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