IDiscFormat2Data::put_ForceMediaToBeClosed method

Determines if further additions to the file system are prevented.


HRESULT put_ForceMediaToBeClosed(



Set to VARIANT_TRUE to mark the disc as closed to prohibit additional writes when the next write session ends.

Set to VARIANT_FALSE to keep the disc open for subsequent write sessions. The default is VARIANT_FALSE.

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 currently a write operation in progress.

Value: 0xC0AA0400


When the free space on a disc reaches 2% or less, the write process marks the disc closed, regardless of the value of this property. This action ensures that a disc has enough free space to record a file system in a write session.

You can erase a rewritable disc that is marked closed.

Note that the IDiscFormat2Data::put_DisableConsumerDvdCompatibilityMode property may supersede this property. Please refer to put_DisableConsumerDvdCompatibilityMode for details.


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