BeginEnumeration function
Resets an enumerator back to the beginning of the enumeration.
Note
This API is for internal use only. It's not intended for use from developer code.
Syntax
HRESULT BeginEnumeration (
[in] int vFunc,
[in] IWbemClassObject* ptr,
[in] LONG lEnumFlags
);
Parameters
vFunc
[in] This parameter is unused.
ptr
[in] A pointer to an IWbemClassObject instance.
lEnumFlags
[in] A bitwise combination of the flags or values described in the Remarks section that controls the properties included in the enumeration.
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_INVALID_PARAMETER |
0x80041008 | The combination of flags in lEnumFlags is invalid, or an invalid argument was specified. |
WBEM_E_UNEXPECTED |
0x8004101d | A second call to BeginEnumeration was made without an intervening call to EndEnumeration . |
WBEM_E_OUT_OF_MEMORY |
0x80041006 | Not enough memory is available to begin a new enumeration. |
WBEM_S_NO_ERROR |
0 | The function call was successful. |
Remarks
This function wraps a call to the IWbemClassObject::BeginEnumeration method.
The flags that can be passed as the lEnumFlags
argument are defined in the WbemCli.h header file, or you can define them as constants in your code. You can combine one flag from each group with any flag from any other group. However, flags from the same group are mutually exclusive.
Group 1
Constant | Value | Description |
---|---|---|
WBEM_FLAG_KEYS_ONLY |
0x4 | Include properties that constitute the key only. |
WBEM_FLAG_REFS_ONLY |
0x8 | Include properties that are object references only. |
Group 2
Constant | Value | Description |
---|---|---|
WBEM_FLAG_SYSTEM_ONLY |
0x30 | Limit the enumeration to system properties only. |
WBEM_FLAG_NONSYSTEM_ONLY |
0x40 | Include local and propagated properties but exclude system properties from the enumeration. |
For classes:
Constant | Value | Description |
---|---|---|
WBEM_FLAG_CLASS_OVERRIDES_ONLY |
0x100 | Limit the enumeration to properties overridden in the class definition. |
WBEM_FLAG_CLASS_LOCAL_AND_OVERRIDES |
0x100 | Limit the enumeration to properties overridden in the current class definition and to new properties defined in the class. |
WBEM_MASK_CLASS_CONDITION |
0x300 | A mask (rather than a flag) to apply against a lEnumFlags value to check if either WBEM_FLAG_CLASS_OVERRIDES_ONLY or WBEM_FLAG_CLASS_LOCAL_AND_OVERRIDES is set. |
WBEM_FLAG_LOCAL_ONLY |
0x10 | Limit the enumeration to properties that are defined or modified in the class itself. |
WBEM_FLAG_PROPAGATED_ONLY |
0x20 | Limit the enumeration to properties that are inherited from base classes. |
For instances:
Constant | Value | Description |
---|---|---|
WBEM_FLAG_LOCAL_ONLY |
0x10 | Limit the enumeration to properties that are defined or modified in the class itself. |
WBEM_FLAG_PROPAGATED_ONLY |
0x20 | Limit the enumeration to properties that are inherited from base classes. |
Requirements
Platforms: See System Requirements.
Header: WMINet_Utils.idl
.NET Framework Versions: Available since 4.7.2