According to the MSDN CD, GetDiskFreeSpace() returns incorrect values even
on volumes smaller than 2G under Win95 (see excerpt, below.) It says nothing
about win98,
but i figure there the same ( am I wrong? )
is there a good way to find out the cluster size (most important, now), and
other information that GetDiskFreeSpace() returns? GetDiskFreeSpaceEx()
doesn't return as much info.
I'll need this info for more recent OSs, also.
thanks for your help,
mike
"because the os manipulates the values ..." where'd it get the correct
values to start with?
from msdn cd:
Windows 95: For volumes that are larger than 2 gigabytes, the
GetDiskFreeSpace function may return misleading values. The function caps
the values stored into *lpNumberOfFreeClusters and *lpTotalNumberOfClusters
so as to never report volume sizes that are greater than 2 gigabytes. Even
on volumes that are smaller than 2 gigabytes, the values stored into
*lpSectorsPerCluster, *lpNumberOfFreeClusters, and *lpTotalNumberOfClusters
values may be incorrect. That is because the operating system manipulates
the values so that computations with them yield the correct volume size.
--
Regds
Navin
---------
Anti Spam: Replace "z" with "s" from email address before replying. Spammers
will be reported to the authorities.
"mike c" <cm...@ptd.net> wrote in message
news:uBYFr8roBHA.1620@tkmsftngp02...
I suspect the "bug" is related to network volumes, were reading the boot
sector doesn't work.
"Navin Pai" <na...@aereouz.com> wrote in message
news:Orq7o3HpBHA.2328@tkmsftngp04...
| you can get the correct value from the boot sector. open the raw disk
| ("\\\\.\\c:", etc) and read the first 512 bytes. you will have the boot
| sector which contains the information you required.
|
That won't help on Win9x, which is what the OP was asking about.
--
-GJC
-gcha...@shore.net
-War is the last resort of the incompetent.
> For Win95, local volumes are not larger than 2GB. I expect GetDickFreeSpace
> is accurate in this case.
This is true for the original Windows 95, but OSR2 introduced FAT32.
[...]
--
Magnus Bäck | CS/CE student, Lund Institute of Technology
ba...@swipnet.se | http://www.jpl.se/~magnus/english.html
as long as NT, 2k, win9x, and ME have the same mbr format, then i just need
to find functions to read the 1st sector in vcrt, ATL/COM, and API ( for
full knowlege of disk access.)
I know how to get the sector with Int 13h, but i remember a post where
someone mentioned using vwin32 functions for raw (? direct ?) disk access
instead.
what are my options? sorry i got back to this thread so late. i found the
info in the mbr and didn't come back to ask the above.
thanks,
mike
Navin Pai <na...@aereouz.com> wrote in message
news:Orq7o3HpBHA.2328@tkmsftngp04...