Switch to full style
For C/C++ coders discussions and solutions
Post a reply

diskfree and disk total from cdr's

Tue Jul 03, 2007 11:48 pm

I currently use C-Builder 5 and I am trying to get the diskfree and disk totals
from CDR's that haven't been closed yet... using the code below they always
come back as 0... though if I check the 'My computer', 'properties', the proper
amounts show up...

__int64 AmtFree = DiskFree(jkc);
__int64 Total = DiskSize(jkc);
AnsiString S;
S.sprintf("%I64d percent is free: %I64d KB", AmtFree*100/Total, AmtFree/1024 );

note also that fixed disks as well as CDRW's (drag and drop) work fine...



Re: diskfree and disk total from cdr's

Wed Jul 04, 2007 12:42 pm

rsmith5413 wrote:I currently use C-Builder 5 and I am trying to get the diskfree and disk totals
from CDR's that haven't been closed yet... using the code below they always
come back as 0... though if I check the 'My computer', 'properties', the proper
amounts show up...

__int64 AmtFree = DiskFree(jkc);
__int64 Total = DiskSize(jkc);
AnsiString S;
S.sprintf("%I64d percent is free: %I64d KB", AmtFree*100/Total, AmtFree/1024 );

note also that fixed disks as well as CDRW's (drag and drop) work fine...

Thank you for posting this here. :biggrin:

Post a reply
  Related Posts  to : diskfree and disk total from cdr's
 Get Disk total space     -  
 calculate the total type of stocks     -  
 getting gst, pst total to diplay in my javascript form     -  
 total ocurrence of substring in sting     -  
 calculates the total cost with javascript     -  
 Need help with JavaScript function calculate the total pric!     -  
 Gui that take direcrtory on hard disk from user     -  
 How to get hard disk serial no in java ??     -  
 Get disk free space for Unix-Linux in php     -