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 ...

Get COM+ Programming with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.