WmiConfigurationAttribute.HostingGroup 屬性

定義

取得或設定 WMI 提供者的裝載群組。

public:
 property System::String ^ HostingGroup { System::String ^ get(); void set(System::String ^ value); };
public string HostingGroup { get; set; }
member this.HostingGroup : string with get, set
Public Property HostingGroup As String

屬性值

String 值,表示 WMI 提供者的裝載群組。

範例

在下列範例中, WmiConfigurationAttribute 會用來指出它所包含的元件會實作在 NetworkService 安全性內容下執行的同進程提供者,並且裝載於同時在 NetworkService 安全性內容內執行之相同裝載群組中任何其他同進程提供者的 Wmiprvse.exe 進程實例中。

[assembly: WmiConfiguration("root\\NVPair", HostingModel = ManagementHostingModel.NetworkService), HostingGroup = "MyProviders"]

備註

裝載群組僅適用於裝載於進程中的提供者。 分離提供者會忽略此值。

裝載群組是一組同進程提供者,全部都指派相同的裝載組名。 主控組名是您定義以邏輯方式將提供者分組的字串。 在相同安全性內容下執行之相同裝載群組中的所有同進程提供者都會裝載於 Wmiprvse.exe 進程的單一實例內。 因此,共用相同裝載群組和安全性內容的提供者會共用相同的服務主機進程。

適用於