Jump to content

How to get Size Of Disk in DiskPart


meoit
 Share

Recommended Posts

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.

 

Link to comment
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.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...