Article View: news.software.nntp
Article #14155Re: Programming: free space on disk
From: Bernard David
Date: Fri, 17 Jan 1997 00:00
Date: Fri, 17 Jan 1997 00:00
39 lines
1896 bytes
1896 bytes
On Thu, 16 Jan 1997 15:33:11 +0100, Vladimir Eliachevitch <Vladimir.Eliachevitch@fr.bosch.de> wrote: >I need in my c-program ( I use watcom c 10.6) to get information >about the total and free space in HPFS and NTFS Partitions under >Win NT. The function _getdiskfree and _dos_getdiskfree produce >under NTFS and HPFS the false result. It must exist other >functions and possibilities to get this information. I have the same problem. Here is a more complete description: I have to write a 16 bit program that should run under Win 3.x, 95 and NT (MS-VC 1.51 or BC3.1) that shows a drive size. With both compilers, the dos function _dos_getdiskfree() (dos_getdiskfree under BC3.1) always returns 31249 clusters on big drives (1.2 Gb) under NT3.51 or NT4.0. I don't think it's a 16 bits limitation. The number of clusters is unsigned so : 65535 max clusters * 512 bytes/sector *64 sectors/cluster > 2Gb and I should be able to get drive space correctly. Under Win3.x and Win 95 the same program works fine as well as under NT for small drives (850 Mb). But for bigger ones under NT it always reports 31249 clusters (976.5 Mb). Is it a NT (un)known bug ? If not, is there a work-around (in 16-bits) ? Any hint will be greatly appreciated. Thanks. Bernard David <bernard.david@deboeck.be>
Technical Details
Message-ID:
<32df7d86.73544@news.eunet.be>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<32DE3C27.1AA@fr.bosch.de>Show Full Headers
Complete Article Headers
Message-ID: <32df7d86.73544@news.eunet.be> Subject: Re: Programming: free space on disk Date: Fri, 17 Jan 1997 00:00:00 +0000 From: bernard.david@deboeck.be (Bernard David) References: <32DE3C27.1AA@fr.bosch.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 210420943 Distribution: inet Organization: De Boeck & Larcier Newsgroups: news.software.nntp