This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
[Beginning with Windows 8 and Windows Server 2012, theVirtual Disk Service COM interface is superseded by theWindows Storage Management API.]
Removes partition informationand uninitializes basic or dynamic disks.
Windows Server 2003: TheClean method is not supported for removable devices.
HRESULT Clean( [in] BOOL bForce, [in] BOOL bForceOEM, [in] BOOL bFullClean, [out] IVdsAsync **ppAsync);
[in] bForce
IfTRUE, cleans a disk containing data volumes or ESP partitions.
[in] bForceOEM
IfTRUE, cleans a MBR-based disk containing the known OEM partitions in the following table or cleans aGPT-based disk containing any OEM partition. An OEM partition has the GPT_ATTRIBUTE_PLATFORM_REQUIRED flag seton a GPT-based disk.
Partition type | Description |
---|---|
0x12 | An EISA partition. |
0x84 | A hibernation partition for laptops. |
0xA0 | A diagnostic partition for some HP laptops. |
0xDE | A partition defined by Dell. |
0xFE | An IBM IML partition. |
[in] bFullClean
IfTRUE, cleans the entire disk by replacing the data on each sector with zeros; otherwise, this method cleansonly the first and the last megabytes on the disk.
[out] ppAsync
The address of a pointer to theIVdsAsync interfacepointer, which VDS initializes on return. Callers must release the interface. Use this pointer to cancel, waitfor, or query the status of the operation.
This method can return standard HRESULT values, such as E_INVALIDARG or E_OUTOFMEMORY, andVDS-specific return values. It can also return convertedsystem error codes using theHRESULT_FROM_WIN32 macro. Errors can originate from VDS itself or from the underlyingVDS provider that is being used. Possible return values include the following.
Return code/value | Description |
---|---|
| The data was removed successfully and the disk was uninitialized. |
| There is no media in the removable device. |
| The disk is missing. |
| The operation failed under one of the following conditions:
|
| The partition table is cleaned, but not all sectors are cleaned during a full clean. Alternatively, some sectors of the first megabyte and the last megabyte are cleaned; however, unless the clean is a full clean, the remaining sectors are not cleaned. |
Before calling this method, the caller should dismount any mounted volumes on the disk by callingIVdsVolumeMF::Dismount for each volume.
Use thebForce parameter, thebForceOEM parameter, or bothwith this method unless you first delete all data volumes, known OEM partitions, and ESP partitions on the disk.This requirement excludes metadata partitions such as the MSR, the LDM metadata partition, and unknown OEM partitions.
Windows Server 2003: TheClean method is not supported for removable devices.
Implementers must return a pointer to theIVdsAsync interface forthis method, regardless of whether the call initiates an asynchronous operation.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | vds.h |
Library | Uuid.lib |
Was this page helpful?
Was this page helpful?