Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 20th, 2004, 01:37 AM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to liesberg
Default How to get free disk space in win32

Hi there

  I want to know how to get the free disk space for a drive (e.g.:C:\) in win32 with c++. What is the API function and how to use it ?

Thanks very much
liesberg ([email protected])

Reply With Quote
  #2 (permalink)  
Old July 3rd, 2004, 10:48 AM
Authorized User
 
Join Date: Dec 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

struct dfree dtable;
   getdfree(1, &dtable);
   discspace = (long) dtable.df_avail * (long)dtable.df_bsec * (long)dtable.df_sclus;


Georges
Reply With Quote
  #3 (permalink)  
Old July 13th, 2007, 03:17 PM
Registered User
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Georges
The instructions given don't work in C Borland compiler, even with all the necessary #include(s).

I am still looking for an answer to Liesberg question.
Thanks
Claudio ([email protected])
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitor disk space gregalb SQL Server 2000 3 July 11th, 2007 05:36 PM
Need a Script to Monitor Free Disk Space remotely Vishal Saini Windows Server 0 June 22nd, 2007 09:31 AM
Wiping Free Space Michael109 Intro Programming 3 June 20th, 2007 02:10 AM
how to check free space on disk using FTP client? woojtii C# 2005 1 June 5th, 2007 02:13 AM
Free space on disc elansolutionsltd Access VBA 3 February 26th, 2006 08:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.