Previous Topic: Method CommitNext Topic: Method Rollback


Method CommitAsync

This method asynchronously commits a message that was analyzed using deferred completion.

Important!  CommitAsync() must only be called if the object was imported asynchronously (by using ImportObjectAsync()).

HRESULT Commit(
    [in, unique]    LPVOID                       contextTag,
    [in]            IWgnImportConnectorCallback  *completionCallback
    );

Where:

contextTag

This parameter allows the client to supply contextual data to this asynchronous operation. The WgnActiveImportConnector will transparently pass this through to the callback via the IWgnImportConnectorCallback interface.

completionCallback

The interface on which the client will be notified of the result of the commit operation.

Return values for CommitAsync method

WGN_S_ACTIVEIMPORT_PENDING

The message is being committed asynchronously. The completionCallback interface will be invoked to inform the client when the operation completes. This may be invoked before this method returns, due to the concurrent nature.

Error code

Any return value that fails the SUCCEEDED() macro, indicating that the synchronous commit operation failed, or that the asynchronous commit failed to be instigated. The completionCallback interface will not be invoked in this situation.