IDiscFormat2RawCD::CancelWrite method (imapi2.h)
Cancels the current write operation.
Syntax
HRESULT CancelWrite();
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 |
---|---|
|
There is no write operation currently in progress.
Value: 0xC0AA0601 |
|
Unspecified failure.
Value: 0x80004005 |
Remarks
To cancel the write operation, you must call this method from the DDiscFormat2RawCDEvents::Update event handler that you implemented.
You must also call the IDiscFormat2RawCD::ReleaseMedia method after calling this method.
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
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 |