3.1.1.1.3 Asynchronous calls

The server MUST start the requested operation and MUST return the appropriate response without waiting for the completion of the operation. If starting the requested operation fails, the server MUST return the error as a return value of the method; MUST NOT keep a reference to IWbemObjectSink (passed as a response handler); and MUST NOT call IWbemObjectSink::Indicate or IWbemObjectSink::SetStatus.

Section 3.2.4.2.9 lists the asynchronous method calls. Before starting an asynchronous operation, the server method MUST create an entry in AsyncOperationTable, storing a reference to the client's IWbemObjectSink in ClientSyncPointer, and set other fields (CallbackInprogress, CallCancelled, and SetStatusWithFinalResultCalled) to FALSE.

For the requested operation to begin successfully, the server MUST return WBEM_S_NO_ERROR, as specified in section 2.2.11 and MUST keep a reference to IWbemObjectSink passed as a response handler.

The server MUST invoke the IWbemObjectSink::Indicate and IWbemObjectSink::SetStatus methods, as specified in sections 3.2.4.1.1 and 3.2.4.1.2. If the call to IWbemObjectSink::Indicate or IWbemObjectSink::SetStatus fails, the server MUST cancel the asynchronous operation.

The server MAY call IWbemObjectSink::SetStatus multiple times when it executes the asynchronous operation in order to report the operation progress,<15> as explicitly requested by a client using a WBEM_SEND_STATUS flag. In this situation, the HRESULT parameter contains the progress information.

Calls made by the server into the client-provided IWbemObjectSink interface SHOULD use an authentication level that is greater than NONE. If that fails, and if the UnsecAppAccessControlDefault flag is set to false and AllowAnonymousCallback flag is set to true, the server SHOULD retry with an authentication level of NONE.<16> The server MUST try to make the calls by using the machine principal name.

The total number of client operations is limited by MaxRequestLimit as described in section 3.1.4.3.