Editare

Partajați prin


WmiConfigurationAttribute.HostingGroup Property

Definition

Gets or sets the hosting group for the WMI provider.

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

Property Value

A String value that indicates the hosting group for the WMI provider.

Examples

In the following example, the WmiConfigurationAttribute is used to indicate that the assembly it is contained in implements an in-process provider that runs under the NetworkService security context and is hosted in a instance of the Wmiprvse.exe process that also hosts any other in-process providers in the same hosting group that also run within the NetworkService security context.

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

Remarks

Hosting groups only apply to providers that are hosted in-process. The value is ignored for decoupled providers.

A hosting group is a set of in-process providers that are all assigned the same hosting group name. The hosting group name is a string that you define to logically group the providers. All of the in-process providers in the same hosting group running under the same security context are hosted within a single instance of the Wmiprvse.exe process. So, providers that share the same hosting group and security context share the same service host process.

Applies to