Provider Interface

The Provider class is the base class for the class or classes that the framework provider supports.

Note  The Provider class is part of the WMI Provider Framework. The Provider Framework classes are obsolete and not recommended. For more information about the preferred ways to write a WMI COM provider or a WMI provider that uses the .NET Framework System.Management namespaces, see Using WMI.

The Provider class encapsulates implementations of the methods of IWbemServices and includes several helper functions. A framework provider overrides one of the methods of the Provider class for each feature that it supports. For example, a provider that supports query processing overrides the Provider::ExecQuery method.

An instance of the Provider class is created for each WMI class that has a framework provider

Methods

The Provider interface inherits the methods of the IUnknown interface.

In addition, Provider defines the following methods.

MethodDescription

Commit

Returns the current instance to WMI.

CreateNewInstance

Allocates a new CInstance object and returns a pointer to it.

DeleteInstance

Deletes an instance. Called by WMI.

EnumerateInstances

Retrieves all instances of a framework provider's class. Called by WMI.

ExecMethod

Invokes a method on a class or instance. Called by WMI.

ExecQuery

Processes a WMI Query Language (WQL) query. Called by WMI.

Flush

Called by the provider framework to delete all unnecessary memory in use by the provider.

GetLocalComputerName

Returns a constant reference to the computer name in CHString format.

GetLocalInstancePath

Attempts to build a full object path to a specified instance.

GetObject

Retrieves an instance of a class. Called by WMI.

GetProviderName

Retrieves the name of the provider.

MakeLocalPath

Builds a full instance path from a relative path.

PutInstance

Updates an instance. Called by WMI.

SetCreationClassName

Sets the CreationClassName string property of the given instance to the name of this provider.

ValidateDeletionFlags

Determines whether a set of flags is valid for a delete operation.

ValidateEnumerationFlags

Determines whether a set of flags is valid for an enumeration.

ValidateFlags

Determines whether a set of flags is valid.

ValidateGetObjFlags

Determines whether a set of flags is valid for an instance retrieval operation.

ValidateMethodFlags

Determines whether a set of flags is valid for an execute method operation.

ValidatePutInstanceFlags

Determines whether a set of flags is valid for an instance update operation.

ValidateQueryFlags

Determines whether a set of flags is valid for a query operation.

 

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderProvider.h (include FwCommon.h)
LibraryFramedyn.lib
DLLFramedyn.dll

Send comments about this topic to Microsoft

Build date: 11/3/2009

Tags :


Page view tracker