[vds] improve VDS calls

* Make sure that instantiated objects are released.
* Factorize the instantiating of disk interfaces.
* Allow the provision of an offset to delete a single partition.
* Add a ListVdsVolumes() call (which is pointless since Microsoft *CRIPPLED* its VDS implementation).
This commit is contained in:
Pete Batard 2020-10-25 13:09:32 +00:00
parent 8085a2846d
commit 3758f84b17
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
5 changed files with 277 additions and 108 deletions

View file

@ -1747,7 +1747,7 @@ DWORD WINAPI FormatThread(void* param)
// for VDS to be able to delete the partitions that reside on it...
safe_unlockclose(hPhysicalDrive);
PrintInfo(0, MSG_239, lmprintf(MSG_307));
if (!DeletePartitions(DriveIndex)) {
if (!DeletePartition(DriveIndex, 0, FALSE)) {
SetLastError(FormatStatus);
uprintf("Notice: Could not delete partitions: %s", WindowsErrorString());
FormatStatus = 0;