IDiscFormat2Data::CancelWrite method

Cancels the current write operation.

Syntax

HRESULT CancelWrite(

);

Parameters

This method has no parameters.

Return Value

S_OK is 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
E_IMAPI_DF2DATA_WRITE_NOT_IN_PROGRESS
There is no write operation currently in progress.

Value: 0xC0AA0401

E_FAIL
Unspecified failure.

Value: 0x80004005

Remarks

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

Note that calling this method does not immediately cancel the write operation on all media due to media-specific requirements. For example, when writing to a CD, the write operation can continue for up to three more minutes.

This method leaves the media in an indeterminate state. For rewriteable media, you should call the IDiscFormat2Erase::EraseMedia method after calling this method to prepare the media for future use.

Requirements

   
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

IDiscFormat2Data

IDiscFormat2Data::Write