That's from StarBurn SDK F.A.Q. (actually it's recommended to read the manuals, they are your best friends
***
How could I get progress callbacks when doing rewritable disc erase operation?
Unfortunately there's no straight-forward way to do this. Most (99%) of the
burners don't have any progress indication for erase process done in hardware.
However such a trick could be applied using software approximation:
1) Get expected size of the burning region (for CDs it would be 15MB for just
TOC erase and full CD size for full disc erase, for DVDs it would be around
150MB for just TOC erase and full DVD size for full disc erase). Say it would
be Xx.
2) Get speed device would be using in KB/sec. Say it would be Yy.
3) Now you can get expected time in seconds for such operation as Tt = ( Xx *
1024 ) / Yy.
4) Spawn a thread controlling progress dialog and just move progress position
using timer. Keep in mind it's expected to move from 0% to 100% in Tt
seconds. We're done!
Console samples are just too dumb and don't have any progress indication for
erase but GUI samples all have complete progress indication done using algorithm
just described below. If you'd take a look at other burning software you'd see they
do exactly the same.
***
Chris.Lu wrote:
When I use erase function to erase the disc, I don't know how to get the current process. Because, I want to get the current process percent to show the process bar. In fact, I have passed the callback function when I create. Can you give any suggestion or method?