#1 Burning Software

It is currently Mon Dec 23, 2024 2:58 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to get the size of a file added to the file tree
PostPosted: Sun Oct 02, 2005 3:54 pm 
Offline

Joined: Sun Oct 02, 2005 3:40 pm
Posts: 4
Location: U.K
How do you get the file size in the CN_FILE_TREE_PROGRESS_ADD Callback?. I need it so I can keep track of the total size of the file tree, so I can remove items if the tree gets to big to fit on a certain disc.


Top
 Profile  
 
 Post subject: Re: How to get the size of a file added to the file tree
PostPosted: Mon Oct 03, 2005 12:06 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Fastest way would be:

1) Open file calling CreateFile(...) Win32 API call passing full file name

2) Call GetFileSize(...) upon handle returned during step 1

3) Update global approx tree size ( could do padding to 2048 bytes to be 100% sure)

4) Call CloseHandle(...) to free file handle returned during call to step 1

NullDVD wrote:
How do you get the file size in the CN_FILE_TREE_PROGRESS_ADD Callback?. I need it so I can keep track of the total size of the file tree, so I can remove items if the tree gets to big to fit on a certain disc.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group