all groups > dotnet component services > april 2008 >
You're in the

dotnet component services

group:

Loop through COM+ compoents of a COM+ application ????????????



Loop through COM+ compoents of a COM+ application ???????????? David
4/7/2008 12:52:30 PM
dotnet component services:
I would like to parse through a list of the COM+ components for a COM+
application, is this possible ?

Ultimately what I would like to do is change the constructor string
for a COM+ component that is in
a COM+ application, is this possible ?

Any help would be appreciated.

Heres what I have tried to get a list of the COM+ components for a COM
+ application.

COMAdmin.COMAdminCatalog objAdmin;
COMAdmin.COMAdminCatalogCollection objApplications;

objApplications = null;

try
{
objAdmin = new COMAdmin.COMAdminCatalog();

objApplications =
(COMAdmin.COMAdminCatalogCollection)objAdmin.GetCollection("Applications");

objApplications.Populate();

// This produces a list of all of the COM+ applications. (COM+
Utilities, COM+ Explorer, etc ...)
foreach (COMAdmin.COMAdminCatalogObject theApplication in
objApplications)
{
COMAdmin.ICatalogCollection theComponents;
theComponents =
(COMAdmin.ICatalogCollection)objApplications.GetCollection("Components",
theApplication.Key);

// At this point I would think that theComponents.Count would be
greater than
// 0 for any COM+ application that has a component, on my computer
this would
// be COM+ Explorer, COM+ Utilities, COM+ QC Dead Letter Queue
Listener, etc.
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
AddThis Social Bookmark Button