IWbemConfigureRefresher::AddEnum method (wbemcli.h)

The IWbemConfigureRefresher::AddEnum method adds an enumerator to the requested refresher.

Syntax

HRESULT AddEnum(
  [in]  IWbemServices   *pNamespace,
  [in]  LPCWSTR         wszClassName,
  [in]  long            lFlags,
  [in]  IWbemContext    *pContext,
  [out] IWbemHiPerfEnum **ppEnum,
  [out] long            *plId
);

Parameters

[in] pNamespace

An IWbemServices pointer back into Windows Management, which can service any request made by the provider. If the method must call back into Windows Management during its execution, the provider should call AddRef with the pNamespace pointer.

[in] wszClassName

Constant, null-terminated string of 16-bit Unicode characters containing the name of the class that is enumerated.

[in] lFlags

Bitmask of flags that modify the behavior of this method. If this parameter is set to WBEM_FLAG_USE_AMENDED_QUALIFIERS, the returned instances contain localized qualifiers if they are available.

[in] pContext

Typically NULL; otherwise, this is a pointer to an IWbemContext object that is required by one or more dynamic class providers. The values in the context object must be specified in the specific provider documentation. For more information about this parameter, see Making Calls to WMI.

[out] ppEnum

Pointer that holds the reference to a IWbemHiPerfEnum object, which will contain the enumeration. The client must call Release on this pointer when it is no longer required.

[out] plId

Pointer to an integer returned by the provider that uniquely identifies the refreshable enumeration.

Return value

This method returns an HRESULT indicating the status of the method call. The following list lists the value contained within an

Note  HRESULT

 
.

Remarks

The supplied class must specify a valid class, which is provided by the High-Performance Provider. All instances of the returned enumerator can be queried after calls. On each call to refresh, the number of instances in the enumerator can vary. Only instances of the specified class name are returned; subclasses of the specified class will not be enumerated because detailed enumeration is not supported. The returned enumerator must not be touched by the client while a Refresh operation is in process. The returned identifier can be used by the Remove function to remove the object. Note that it is not necessary for the user to explicitly remove added enumerators. However, the client must call Release on the returned enumerator when it is no longer required.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header wbemcli.h (include Wbemidl.h)
Library Wbemuuid.lib

See also

IWbemConfigureRefresher