Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IWbemConfigureRefresher::AddEnum method

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    *pCtx,
  [out] IWbemHiPerfEnum **ppEnum,
  [out] long            *plId
);

Parameters

pNamespace [in]

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.

wszClassName [in]

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

lFlags [in]

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.

pCtx [in]

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.

ppEnum [out]

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.

plId [out]

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 table lists the value contained within an

Note  HRESULT
.
Return codeDescription
WBEM_E_INVALID_PARAMETER

The specified parameter is not valid.

WBEM_E_INVALID_CLASS

The specified class was not valid.

WBEM_E_ACCESS_DENIED

The current user does not have permission to perform this operation.

WBEM_E_INVALID_OPERATION

The requested instance is not supplied by a high-performance provider.

WBEM_E_REFRESHER_BUSY

The refresher is busy with another operation.

WBEM_S_NO_ERROR

The operation was successful.

 

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

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Wbemcli.h (include Wbemidl.h)

Library

Wbemuuid.lib

DLL

Wbemperf.dll

See also

IWbemConfigureRefresher

 

 

Show:
© 2015 Microsoft