Free2Code
 
Time: 2008-11-21, 09:05pm
windows API to find disk size
Subject: windows API to find disk size  ·  Posted: 2006-09-12, 03:46am
Rank: ? (171)
Member #: 13735
Is there any API that gives me the disk size by taking the drive letter as the input ? (in windows 2000)

For example:

If a disk of 120GB contains C: (40 GB), D: (20GB) and remaining raw.

If the input is C: then GetDiskFreeSpaceEx() gives the partition size i.e, it gives the total size and free size in C:

I want an API that takes the input C: and gives the entire disk size (120GB)

Any help would be very much appreciated.


Those who laughs last... thinks slowest!!
 
  Reply to this ·  Post link ·  Top
Subject: Re: windows API to find disk size  ·  Posted: 2006-09-13, 02:37am
Rank: ? (4821)
Member #: 3416
wmi has a win32_diskdrive class you could probably use. a quick glance didn't show any way to get the free space though -- just the total.

my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

icons