次の方法で共有


3.1.4.2.2 IWbemObjectSink::SetStatus (Opnum 4) Server Details

When the IWbemObjectSink::SetStatus method is called, the parameter MUST contain the result of the operation or the progress status information.

 HRESULT SetStatus(
   [in] long lFlags,
   [in] HRESULT hResult,
   [in] BSTR strParam,
   [in] IWbemClassObject* pObjParam
 );

lFlags: Flags that give information about the operation status. The flags MUST be interpreted as specified in the following table.

Note The flags are not bit flags and cannot be combined.

Value

Meaning

WBEM_STATUS_COMPLETE

0x00000000

Indicates the end of the asynchronous operation.

WBEM_STATUS_PROGRESS

0x00000002

Indicates the progress state of the asynchronous operation.

Any other DWORD value that does not match the condition shown MUST be treated as not valid and an error MUST be returned.

hResult: The HRESULT value of the asynchronous operation or notification. This hResult MUST be the same HRESULT that the WMI client gets from the matching synchronous operation when the WMI client makes an asynchronous request to the WMI server.

strParam: If the parameter is NULL, the server MUST ignore the parameter. If the parameter is not NULL, it MUST represent the operational result of the asynchronous operation. The string MUST be the same as the string that is returned from the IWbemCallResult::GetResultString (Opnum 4) method when the operation is executed synchronously.

pObjParam: If the parameter is NULL, the server MUST ignore the parameter. If the parameter is not NULL, the object MUST contain additional error information for the asynchronous operation failure.

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)