The Clean method cleans a disk.

 HRESULT Clean(
   [in] long bForce,
   [in] long bForceOEM,
   [in] long bFullClean,
   [out] IVdsAsync** ppAsync
 );

bForce: A Boolean value that indicates whether the cleaning operation will be forced. If set, the method attempts to clean the disk, even if data volumes or ESP partitions are present.

bForceOEM: A Boolean value that indicates whether the cleaning operation of an OEM partition will be forced. If the disk contains an OEM partition, but bForceOEM is not set, the operation SHOULD fail. If the value is set, the method attempts to clean the disk, even if OEM partitions are present.<99>

bFullClean: A Boolean value specifying whether the cleaning operation removes all the data from the disk.

ppAsync: A pointer to an IVdsAsync interface that, if the operation is successfully completed, receives the IVdsAsync interface to monitor and control this operation. Callers MUST release the interface when they are done with it.

Return Values: The method MUST return zero or a non-error HRESULT (as specified in [MS-ERREF]) to indicate success, or return an implementation-specific nonzero error code to indicate failure. For the HRESULT values predefined by the Virtual Disk Service Remote Protocol, see section 2.2.3.

Note This method is not valid on CD/DVD devices.

When the server receives this message, it MUST validate the following parameter:

The server MUST perform the following:

The server MUST then perform the following in sequence. Errors generated in this sequence of steps are returned in the pHrResult parameter to the IVdsAsync::Wait or IVdsAsyncQueryStatus methods.

The server MUST update the percentage completed value periodically during the preceding sequence. How often the percentage completed is updated, and at what point in the sequence, is implementation-specific.

The server MAY allow the clean operation to be canceled through the IVdsAsync interface.<102>