🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Vladimir Eliachevitch Thu, 16 Jan 1997 00:00
Programming: free space on disk
#14120
Author: Vladimir Eliachevitch
Date: Thu, 16 Jan 1997 00:00
11 lines
977 bytes
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.
Thank You
Vladimir.Eliachevitch@fr.bosch.de
..

Re: Programming: free space on disk
#14124
Author: Brian Hernacki
Date: Thu, 16 Jan 1997 00:00
14 lines
1143 bytes
Vladimir Eliachevitch 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.

Try the win32api function GetDiskFreeSpace(), it seems to produce
correct results for me.

--brian

Re: Programming: free space on disk
#14155
Author: Bernard David
Date: Fri, 17 Jan 1997 00:00
39 lines
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>


Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads