Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

GetDiskFreeSpaceEX API Problem
The information retrieved by a GetDiskFreeSpaceEX API call is stored as a
ULARGE_INTEGER data type (64-bit integer).  I believe that Visual C forms
this data type through a union of two 32-bit integers.   Is it possible to
form a 64-bit integer in a similar manner in C5.5 EE?  Is there a better
method to get the correct amount of free disk space remaining for large
drives?  I was hoping that C6.0 would include a 64-bit integer as a simple
data type but I didn't see it in the documentation.

I was about to develop a .dll under VC  to link in my application but
thought there must be a cleaner and easier way to solve this problem.

Thank you,
Jeff Willias
(Replace this text with a title that relates complete command over a
meaningless repetitive task)



Report this thread to moderator Post Follow-up to this message
Old Post
Jeffrey Willias
03-27-04 04:01 AM


Re: GetDiskFreeSpaceEX API Problem
Na newsima:Nqz3c.27736$Wc4.3770@newssvr24.news.prodigy.com,
Jeffrey Willias <jeffreyw@sbcglobal.net> se trudio da natipka:
> The information retrieved by a GetDiskFreeSpaceEX API call is stored
> as a ULARGE_INTEGER data type (64-bit integer).

Hi Jeffrey

I'm using GetDiskFreeSpace API call instead of GetDiskFreeSpaceEx
Call looks like:

If
 GetDiskFreeSpace(Drive,SectorsPerCluster
,BytesPerSector,NumberOfFreeClust
ers,TotalNumberOfClusters)<>0

 MBFree=SectorsPerCluster*BytesPerSector*
NumberOfFreeClusters/(1024^2)
End


So you do not need any 64 bit variables...



Report this thread to moderator Post Follow-up to this message
Old Post
Drazen Karamatic
03-27-04 04:01 AM


Re: GetDiskFreeSpaceEX API Problem
Drazen,

Thank you for the quick response.  I had read that the GetDiskFreeSpace API
call was not reliable for large drives and, therefore, did not attempt to
use it.  Your information supplies an easy solution for my problem and is
greatly appreciated.

"Drazen Karamatic" <drazen.karamatic@zg.htnet.hr> wrote in message
news:pGB3c.6167$%x4.779664@news.siol.net...
>
> I'm using GetDiskFreeSpace API call instead of GetDiskFreeSpaceEx
> Call looks like:
>
>     If
>  GetDiskFreeSpace(Drive,SectorsPerCluster
,BytesPerSector,NumberOfFreeClust
> ers,TotalNumberOfClusters)<>0
>
>  MBFree=SectorsPerCluster*BytesPerSector*
NumberOfFreeClusters/(1024^2)
>     End
>
>
> So you do not need any 64 bit variables...
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jeffrey Willias
03-27-04 04:01 AM


Re: GetDiskFreeSpaceEX API Problem
Na newsima:doE3c.8713$VP5.4309@newssvr23.news.prodigy.com,
Jeffrey Willias <jeffreyw@sbcglobal.net> se trudio da natipka:
> Drazen,
>
> Thank you for the quick response.  I had read that the
> GetDiskFreeSpace API call was not reliable for large drives and,
> therefore, did not attempt to use it.  Your information supplies an
> easy solution for my problem and is greatly appreciated.


GetDiskFreeSpace is not reliable under W95 and drives larger than 2GB...



Report this thread to moderator Post Follow-up to this message
Old Post
Drazen Karamatic
03-27-04 04:01 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Clarion archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 12:06 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.