Well, after reading through posts here for a while, I decided to register It's really nice to have access to a board like this... Anyways, enough butt kissing!

What I want the function to do, is to check the space on each drive and print it out. Now the problem is that the total bytes information is incorrect. See the output example below.

Code:
#include <stdio.h>
#include <windows.h>

int main(void)
{
	int count = 0;
	ULARGE_INTEGER totalbytes, freebytes;
	char drives[24][5] = {
		"C:\\","D:\\","E:\\","F:\\","G:\\","H:\\","I:\\","J:\\","K:\\",
		"L:\\","M:\\","N:\\","O:\\","P:\\","Q:\\","R:\\","S:\\","T:\\",
		"U:\\","V:\\","W:\\","X:\\","Y:\\","Z:\\"
	};
	
	
	/* do a loop to check each drive */
	for( count = 0 ; count<24 ; count++ )
	{
                                /* something goes wrong, continue with next drive */
		if( GetDiskFreeSpaceEx( drives[count], NULL, &totalbytes, &freebytes) == 0)
			continue;
		
		printf("\t%s\t%lu bytes free\t%lu total bytes\n",drives[count],freebytes,totalbytes);
	}
	
	return 0;
}
Code:
        C:\     1453502464 bytes free   0 total bytes
        E:\     0 bytes free    0 total bytes
As far as I can tell, the bytes free is correct (E:\ is a CD drive). But the total bytes won't show the correct value. It's supposed to display around 6 gigs for the C drive and 83 MB for the E drive. Thanks in advance for any help

scrappy