copy files to a CD

In my winform app. I need to copy some files to a CD without burning them.
 I use file.copy(fileToCopy,@"D:\") and got an IO exeption error.
How can I sove this issue?
yaron89Asked:
Who is Participating?
 
roeibConnect With a Mentor Commented:
try using the CD IMAPI.

here is a sample

http://read.pudn.com/downloads116/sourcecode/windows/csharp/495574/CSharpBurn/CDBurner.cs__.htm

ignore the Burn Part until you want to execure the Burn procedure, this should do the trick
0
 
roeibCommented:
on what position are you recieving the IO Exception? on the Read or the Write.

you cant just write files to the CDROM, in order to Write them you need todo something like XPBurn Application, you need to burn them, meaning you can build an application that stores the location of the files and uppon burn command burns them from the location to the CD
0
 
milindsmCommented:
CD file system is different. Look for CDFS APIs
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
yaron89Author Commented:
Hi,
I don't want to burn the files. I would like to add them to the list of files that waiting to be burn on the CD.  
Thanks
 
 
0
 
yaron89Author Commented:
Thank You
0
 
nffvrxqgrcfqvvcCommented:
Just to add to the question

CSIDL_CDBURN_AREA (FOLDERID_CDBurning)

If you have recording enabled it maps to CSIDL_CDBURN_AREA a temporary location until your ready to burn. You can directly write to this location instead of trying to write to a read only device.

Ex. C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\CD Burning
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.