IWriteEngine2::CancelWrite method (imapi2.h)

Cancels a write operation that is in progress.

Syntax

HRESULT CancelWrite();

Return value

The following values are returned on success, but other success codes may be returned as a result of implementation: The following error codes are commonly returned on operation failure, but do not represent the only possible error values:

Return code Description
S_OK
The method succeeded.
S_IMAPI_WRITE_NOT_IN_PROGRESS
The 'write' operation initiated by the last call to IWriteEngine2::WriteSection has not yet begun, and cannot be canceled. It is recommended to call IWriteEngine2::CancelWrite until a different success code is returned.

Value: 0x00AA0302L

 

The following error codes are commonly returned on operation failure, but do not represent the only possible error values:

Return code Description
E_FAIL
Unspecified failure.

Value: 0x80004005

Remarks

To cancel the write operation, you must call this method from the DWriteEngine2Events::Update event handler that you implemented.

Requirements

Requirement Value
Minimum supported client Windows Vista, Windows XP with SP2 [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header imapi2.h

See also

DWriteEngine2Events

IWriteEngine2

IWriteEngine2::WriteSection

IWriteEngine2::get_WriteInProgress