次の方法で共有


3.1.4.4.5 IEnumWbemClassObject::Skip (Opnum 7)

When the IEnumWbemClassObject::Skip method is invoked, the server MUST move the current position in an enumeration ahead by a specified number of CIM objects.

The IEnumWbemClassObject::Skip method opnum equals 7.

 HRESULT Skip(
   [in] long lTimeout,
   [in] ULONG nCount
 );

lTimeout: MUST be the maximum amount of time, in milliseconds, that the call to Skip allows to pass before it times out. If the constant WBEM_INFINITE (0xFFFFFFFF) is used, the Skip method call waits until the operation succeeds.

nCount: MUST be the number of CIM objects to skip in the enumeration. If this parameter is greater than the number of CIM objects that remain to enumerate, the call MUST skip to the end of the enumeration, and WBEM_S_FALSE MUST be the returned value for the method.

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.

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 EnumWbemClassObjectTable; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.

In response to the IEnumWbemClassObject::Skip method, the server MUST evaluate the uCount and lTimeout parameters as specified in this section. The server MUST skip the requested number of CIM objects from the result set. The server MUST complete the operation within the time allowed by lTimeout. The requested number of CIM objects MUST start from the current index position. The current index position in the enumeration MUST be incremented by the number of CIM objects skipped.

If the earlier semisynchronous operation is finished and the server does not have the requested number of CIM objects to skip, the server MUST return WBEM_S_FALSE by skipping the available CIM objects; otherwise, the server MUST return WBEM_S_NO_ERROR by skipping the requested number of CIM objects. The current index position pointed to by the CurrentIndex entry in EnumWbemClassObjectTable MUST be incremented with the number of CIM objects skipped.

If the earlier semisynchronous operation is not finished and the server does not have the requested number of CIM objects to skip, this method MUST wait for lTimeout, or for the operation to finish, or for availability of the requested number of objects, whichever is earliest. If the number of the remaining CIM objects to be skipped is less than the number requested, the server MUST return WBEM_S_TIMEDOUT; otherwise, the server MUST return WBEM_S_NO_ERROR. The current index position pointed to by the CurrentIndex entry in EnumWbemClassObjectTable MUST be incremented with the number of CIM objects skipped.

If the original semisynchronous operation fails, the server MUST return the error code that the original method would have returned in its synchronous version.

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