The DeletePartition method deletes a partition from the disk at a specified byte offset.

 HRESULT DeletePartition(
   [in] ULONGLONG ullOffset,
   [in] long bForce,
   [in] long bForceProtected
 );

ullOffset: The byte offset of the partition, from the beginning of the disk. This offset MUST be the offset at the start of a partition.

bForce: A Boolean that determines whether the partition deletion is forced. If this parameter is set to a nonzero value, calls to lock and dismount any file system on the partition that fail are ignored. If this parameter is set to zero and any file systems on the partition failed to be locked or dismounted, the server returns VDS_E_DEVICE_IN_USE.

bForceProtected: A Boolean value that determines whether deletion of a protected partition  will be forced.<95>

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 Creating or deleting partitions on dynamic disks is not supported.

Note This method is not valid for CD/DVD or super floppy devices. These devices do not support partition tables.

ERROR_SUCCESS (0x00000000)

When the server receives this message, it MUST perform the following: