XP has the image mastering API (IMAPI) that lets you burn data CDs (not DVDs). Attached is a fixed version of the code I posted to a thread in the forum. It should burn twice in a row now as I've added a dispose method to release the com object.
Users need:
OS: Xp and above, probably not Vista though as it gets IMAPI2 (with DVD support, easy to use and extensible!)
A drive selected as the recorder drive (windows explorer -> drive properties -> recording tab -> Enable CD Recording on this drive).
How it works.
The ICDBurn interface is used to check the user has a cd recorder drive set up correctly.
The staging folder is determined with an api call. The user selects files and folders, and we copy them to the staging folder.
User clicks burn, ICDBurn.Burn is called, this starts the xp cd buning wizard which will guide the user through the burn.
Once done, we call dispose - this releases the com object and IMAPI.exe will close. We then delete the files in the staging area.
Last edited by jo0ls; Jun 12th, 2006 at 06:17 PM.
Reason: tiny tweak