|
-
April 26th, 1999, 03:28 AM
#1
GetDiskSpace Problem !!
Hi
GetDiskSpace is giving a stange problem. it returns -ve value if the Disk space is more than 4 GB.
Is this an already existing bug ?
Anand
M.Anand
Development - Lead ,
Satyam Infoway Limited,
Chennai - 600034
India
-
April 26th, 1999, 06:13 AM
#2
Re: GetDiskSpace Problem !!
from the docs:
"The GetDiskFreeSpace function returns incorrect values for volumes that are larger than 2 gigabytes"
use GetDiskFreeSpaceEx
-
April 26th, 1999, 06:24 AM
#3
Re: GetDiskSpace Problem !!
Hi
Thanks but I am using GetDiskFreeSpaceEx only. It is giving strange behaviour
Anand
M.Anand
Development - Lead ,
Satyam Infoway Limited,
Chennai - 600034
India
-
April 26th, 1999, 04:14 PM
#4
Re: GetDiskSpace Problem !!
I haven't got the documentation to hand, but doesn't the GetDiskFreeSpaceEx function use two parameters (as any thing larger than two GB is not going to fit into one signed 4 byte value.
-
April 27th, 1999, 12:48 PM
#5
Re: GetDiskSpace Problem !!
You have to use ULARGE_INTEGER to get the 64 bit value :
ULARGE_INTEGER available, total, free;
GetDiskFreeSpaceEx ("C:\\", &available, &total, &free);
//Separate out the 32 bit components :
DWORD low, high;
low = available.LowPart;
high = available.HighPart;
Rajaraman
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
|