Solved

GetDiskFreeSpace() API

Posted on 2003-12-02
3
367 Views
Last Modified: 2008-03-06
Hi,
The GetDiskFreeSpace API takes in three variables of type ULARGE_INTEGER. Can someone tell me how I can work with these numbers after I get them? I want to compare them...

Example...
ULARGE_INTEGER var1;
ULARGE_INTEGER var2;

if(var1 > var2) {
 // Do stuff
}

But this doesn't work because the > operator isn't implemented for ULARGE_INTEGER.
0
Comment
Question by:dankennedy
  • 2
3 Comments
 
LVL 2

Author Comment

by:dankennedy
ID: 9861730
Actually it's the GetDiskFreeSpaceEx() API I'm using... but you probably figured that out...
0
 
LVL 86

Accepted Solution

by:
jkr earned 250 total points
ID: 9861758
Just take out the part that has the operators defined:

unsigned __int64 test1 = var1.QuadPart;
unsigned __int64 test2 = var1.QuadPart;

if ( test1 > test2) {
}
0
 
LVL 2

Author Comment

by:dankennedy
ID: 9861848
Thanks!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question