在我的应用程序中,我需要找到DCOM应用程序信息,即捕获DCOM应用程序的安全性
如何使用C#完成此操作。
我通过多种方式尝试过它
using COMAdmin;
COMAdminCatalog catalog;
COMAdminCatalogCollection applications;
// Get the catalog
catalog = new COMAdminCatalog();
// Get the list of all COM+ applications contained within this catalog
applications = (COMAdminCatalogCollection)catalog.GetCollection("Applications");
applications.Populate();
foreach (COMAdminCatalogObject application in applications)
{
COMAdminCatalogCollection components;
components = (COMAdminCatalogCollection)applications.GetCollection("Components", application.Key);
components.Populate();
foreach (COMAdminCatalogObject component in components)
{
Console.WriteLine("Component: " + component.Name);
Console.WriteLine("Component: " + component.Valid);
Console.WriteLine("Component: " + component.Key);
}
}