Zyrenthian
Programmer
Hi all,
I am currently working on writing DVD's. The DVD's write fine but now the user gets an option to compress the data before storing it on the DVD. My validation option which did a bit for bit comparison no longer is valid. My fix for this was to create a temporary directory to store compressed images and when the situation waranted it, compare the data on the DVD with that temporary one.
Originally, I was re-doing the compression and comparing but by doing that, I am not only verifying the write to the DVD but my compression algorithm as well. Too much overhead! So working on the assumption that the compression algorithm is correct I now just call CopyFile(...) when a compression was performed.
My problem comes when the user specifies the temporary drive. Through the use of API calls I have found the local hard drives but I need to check if they have enough storage space incase EVERYTHING (worst case) is compressed. That means 4.7 gigs!
Through the use of GetDiskFreeSpaceEx I thought I could do this but I think the number is TOO large. I am testing GetDiskFreeSpaceEx against my G drive with these properties:
Used Space: 3,978,084,352 bytes 3.70 GB
Free Space: 26,751,528,960 bytes 24.9GB
Capacity: 30,729,613,312 bytes 28.6GB
I am using ULARGE_INTEGER and __i64toa but I dont seem to be getting the appropriate numbers. Can anyone give some suggestions???
Matt
I am currently working on writing DVD's. The DVD's write fine but now the user gets an option to compress the data before storing it on the DVD. My validation option which did a bit for bit comparison no longer is valid. My fix for this was to create a temporary directory to store compressed images and when the situation waranted it, compare the data on the DVD with that temporary one.
Originally, I was re-doing the compression and comparing but by doing that, I am not only verifying the write to the DVD but my compression algorithm as well. Too much overhead! So working on the assumption that the compression algorithm is correct I now just call CopyFile(...) when a compression was performed.
My problem comes when the user specifies the temporary drive. Through the use of API calls I have found the local hard drives but I need to check if they have enough storage space incase EVERYTHING (worst case) is compressed. That means 4.7 gigs!
Through the use of GetDiskFreeSpaceEx I thought I could do this but I think the number is TOO large. I am testing GetDiskFreeSpaceEx against my G drive with these properties:
Used Space: 3,978,084,352 bytes 3.70 GB
Free Space: 26,751,528,960 bytes 24.9GB
Capacity: 30,729,613,312 bytes 28.6GB
I am using ULARGE_INTEGER and __i64toa but I dont seem to be getting the appropriate numbers. Can anyone give some suggestions???
Matt