NextMethod function

Retrieves the next method in an enumeration that begins with a call to BeginMethodEnumeration.

Note

This API is for internal use only. It's not intended for use from developer code.

Syntax

HRESULT NextMethod (
   [in] int                 vFunc,
   [in] IWbemClassObject*   ptr,
   [in] LONG                lFlags,
   [out] BSTR*              pName,
   [out] IWbemClassObject** ppInSignature,
   [out] IWbemClassObject** ppOutSignature
);

Parameters

vFunc
[in] This parameter is unused.

ptr
[in] A pointer to an IWbemClassObject instance.

lFlags
[in] Reserved. This parameter must be 0.

pName
[out] A pointer that points to null prior to the call. When the function returns, the address of a new BSTR that contains the method name.

ppSignatureIn
[out] A pointer that receives a pointer to an IWbemClassObject that contains the in parameters for the method.

ppSignatureOut
[out] A pointer that receives a pointer to an IWbemClassObject that contains the out parameters for the method.

Return value

The following values returned by this function are defined in the WbemCli.h header file, or you can define them as constants in your code:

Constant Value Description
WBEM_E_UNEXPECTED 0x8004101d There was no call to the BeginEnumeration function.
WBEM_S_NO_ERROR 0 The function call was successful.
WBEM_S_NO_MORE_DATA 0x40005 There are no more properties in the enumeration.

Remarks

This function wraps a call to the IWbemClassObject::NextMethod method.

The caller begins the enumeration sequence by calling the BeginMethodEnumeration function, and then calls the [NextMethod] function until the function returns WBEM_S_NO_MORE_DATA. Optionally, the caller finishes the sequence by calling EndMethodEnumeration. The caller may terminate the enumeration early by calling EndMethodEnumeration at any time.

Example

For a C++ example, see the IWbemClassObject::NextMethod method.

Requirements

Platforms: See System Requirements.

Header: WMINet_Utils.idl

.NET Framework Versions: Available since 4.7.2

See also