IWbemHiPerfEnum::GetObjects method

The IWbemHiPerfEnum::GetObjects method retrieves objects currently residing in the enumerator.

Syntax


HRESULT GetObjects(
  [in]  long              lFlags,
  [in]  ULONG             uNumObjects,
  [out] IWbemObjectAccess *apObj,
  [out] ULONG             *puReturned
);

Parameters

lFlags [in]

Integer that contains the flags.

uNumObjects [in]

Size of the array passed to this method in the apObj parameter.

apObj [out]

Pointer that holds the reference to an array of IWbemObjectAccess objects, which contains the returned objects. The array must be big enough to hold all objects in the enumerator.

puReturned [out]

Pointer to a ULONG used to return the number of objects placed in the array.

Return value

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

WBEM_S_NO_ERROR

The method was successful.

WBEM_E_BUFFER_TOO_SMALL

The supplied buffer was too small to hold all the objects in the enumerator.

WBEM_S_TIMEDOUT

The enumerator was busy with another operation.

WBEM_E_NOT_FOUND

The provider could not retrieve a requested instance.

WBEM_E_PROVIDER_NOT_CAPABLE

The provider could not retrieve specific instances, regardless of whether the provider recognizes the paths.

Unless you require a specific error code, you should return this error code in all cases.

WBEM_E_FAILED

The provider failed internally, but the operation was valid.

Remarks

The array must be large enough to hold all objects, or puReturned is filled with the number of returned objects, and WBEM_E_BUFFER_TOO_SMALL is returned.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Wbemcli.h (include Wbemidl.h)

Library

Wbemuuid.lib

See also

IWbemHiPerfEnum
IWbemHiPerfEnum

 

 

Show: