次の方法で共有


3.1.4.7.1 IWbemWCOSmartEnum::Next (Opnum 3)

The IWbemWCOSmartEnum::Next method MUST return an array of IWbemClassObject interface pointers that are encoded by using the ObjectArray structure for optimization purposes. The array of objects that are returned in the ObjectArray structure MUST be identical to the array of CIM objects that are returned by IEnumWbemClassObject::Next.

 HRESULT Next(
   [in] REFGUID proxyGUID,
   [in] long lTimeout,
   [in] ULONG uCount,
   [out] ULONG* puReturned,
   [out] ULONG* pdwBuffSize,
   [out, size_is(,*pdwBuffSize)] byte** pBuffer
 );

proxyGUID: MUST be a client-generated GUID that MUST identify the client. This parameter MUST NOT be NULL.

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

uCount: MUST be the number of requested CIM objects. This parameter MUST NOT be NULL.

puReturned: MUST be a pointer to a ULONG value that MUST contain the number of CIM objects that are returned by the Next method. This parameter MUST NOT be NULL.

pdwBuffSize: MUST be a pointer to a ULONG value that MUST contain the buffer size, in bytes. This parameter MUST NOT be NULL.

pBuffer: MUST be a pointer to the byte array that MUST represent the packet. This parameter MUST NOT be NULL. The byte array represents an array of CIM objects that are encoded by using the ObjectArray format as specified in section 2.2.14. When returned by the server, this parameter can be NULL if a failure occurs or if there are no results to return.

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 a failure occurs, the server MUST return an HRESULT whose S (severity) bit is set as specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation dependent.

WBEM_S_NO_ERROR (0x00)

The IWbemWCOSmartEnum::Next method MUST be called on an IWbemWCOSmartEnum interface that is returned by a previous call to IWbemFetchSmartEnum::GetSmartEnum.

The server MUST locate the associated IEnumWbemClassObject interface pointer in the EnumWbemClassObjectTable, and 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 IWbemWCOSmartEnum::Next, the server MUST evaluate the lTimeout parameter (as specified in this section) and MUST evaluate the GUID in order to identify the client. The server MUST return the maximum number of CIM objects that are requested by uCount.

If the server is unable to return all the requested CIM objects in the requested amount of time, it MUST return WBEM_S_TIMEDOUT. 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 returned CIM objects.

On success, the server MUST return data in the pBuffer by using an ObjectArray structure as specified in section 2.2.14.

The successful method execution MUST return WBEM_S_NO_ERROR. If the number of remaining CIM objects to be retrieved is less than the number of requested CIM objects, the server MUST return WBEM_S_FALSE. Regardless, the server MUST fill the output parameters of the method as specified in section 2.2.14.