Cancels the current write operation.
HRESULT CancelWrite( );
This method has no parameters.
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:
There is no write operation currently in progress.
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.
|Minimum supported client||Windows Vista, Windows XP with SP2 [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|