You need to handle CN_FILE_TREE_PROGRESS_ADD callback message. You'll have each node pointer when called. Keep a global variable and update it adding node size. That's all...
Yves wrote:
Hi,
I want to burn data with SessionAtOnceFromTree(). Everything works fine.
But how can I calculate the size of the Filetree during creation. For example: I want to burn 1000 files with about 1.2 GB. StarBurn_CdvdBurnerGrabber_GetTrackInformation() deliver the free size of the CD/DVD. Lets say 703 MB. I add the first file with StarBurn_ISO9660JolietFileTree_Add(), after that the second file ... But when must I stop to add files, because the Image of the Filetree is bigger than 703 MB?
StarBurn_ISO9660JolietFileTree_GetSizeInUCHARs() works only after calling StarBurn_ISO9660JolietFileTree_BuildImage(). But after building the image, I can┤t add any files with ISO9660JolietFileTree_Add(). Of course, I could calculate 15 MB overhead for TOC, but in most cases, the overhead is much smaller.
Any ideas?
yves