如何使用C#获取DCOM应用程序信息

时间:2014-10-27 11:35:06

标签: c# impersonation dcom

在我的应用程序中,我需要找到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);

            }
        }

0 个答案:

没有答案