|
-
April 22nd, 1999, 03:40 AM
#1
harddiskspace
hi everybody !
how can i find out the free space of a harddisk ?
thanks
-
April 22nd, 1999, 05:36 AM
#2
Re: harddiskspace
Hi,
Try this:
struct _diskfree_t diskfree;
int nDrive = _getdrive(); // use current drive
if (_getdiskfree(nDrive, &diskfree) == 0)
{
strFreeDiskSpace.Format( "%lu KB Free on %c:",
(DWORD)diskfree.avail_clusters *
(DWORD)diskfree.sectors_per_cluster *
(DWORD)diskfree.bytes_per_sector /(DWORD)1024L,
nDrive-1 + _T('A'));
}
else strFreeDiskSpace = Unavailable;
MessageBox( strFreeDiskSpace );
Cheer: Mileta
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|