meoit

How to get Size Of Disk in DiskPart

2 posts in this topic

Hello ALL!.

I used to GetSpaceTotal but it is only in effect for one partition (also called Volume) of Disk and unable to calculate the size of hidden partition or unformatted disk of that.

I want to get the Size of Disk in DiskPart.

.

2016_09_22_154635.jpg

.

Thanks all.

 

Share this post


Link to post
Share on other sites



 

You might be able to build something with these two functions...

...returns bytes

_WinAPI_GetDriveNumber

_WinAPI_GetDiskFreeSpaceEx

Success: The array containing the following information:
    [0] - The total number of available free bytes on a disk.
    If per-user quotas are being used, this value may be less than the total number of free bytes on a disk.
    [1] - The total number of available bytes on a disk.
    If per-user quotas are being used, this value may be less than the total number of bytes on a disk.
    [2] - The total number of free bytes on a disk.
1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now