Compartir a través de


3.1.4.4.1 IEnumWbemClassObject::Reset (Opnum 3)

When the IEnumWbemClassObject::Reset method is invoked, the server MUST reset the enumeration sequence to the beginning of the collection of CIM objects.

 HRESULT Reset();

This method has no parameters.

Return Values: This method MUST return an HRESULT value that MUST indicate the status of the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to indicate the successful completion of the method. If the IEnumWbemClassObject::Reset method is invoked on an enumerator that does not support reset capability, the server MUST return WBEM_E_INVALID_OPERATION.

WBEM_S_NO_ERROR (0x00)

The server MUST locate the entry in EnumWbemClassObjectTable with EnumWbemClassObjectPointer matching IEnumWbemClassObject.

The server MUST validate that the security principal that makes the call is the same as the ClientSecurityContext of the SemiSinkResultSetObject pointed to by the entry in the EnumWbemClassObjectTable; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.

In response to the IEnumWbemClassObject::Reset method, the server MUST reset the status of the enumeration (as specified in this section) if the enumerator is not created by using WBEM_FLAG_FORWARD_ONLY by setting the CurrentIndex entry in EnumWbemClassObjectTable to start the index of ResultArray.

If the enumerator is created by using WBEM_FLAG_FORWARD_ONLY, the server MUST return WBEM_E_INVALID_OPERATION.

A successful method execution MUST return WBEM_S_NO_ERROR.

A failed method execution MUST return an error in the format that is specified in section 2.2.11.