Project Description
This C#-based library allows you to communicate directly with devices that follow the SCSI standard from user-mode, such as CD/DVD drives and hard disks. You can use this library to create your own CD burning program, just as the sample utility does.

The SCSI T10 Standard
The SCSI standard, published by the T10 committee (http://www.t10.org/), governs access to many modern computer devices, such as block devices (e.g. hard disks) and multimedia devices (e.g. CD/DVD drives).

Sample Program
To test this project, just download the sample ISOBurn utility. You can recompile it or use the Release version of the binary.
The steps:
  1. Run the ISO burning utility.
  2. Add the files and folders you would like to burn.
  3. Insert a writable CD in your burner drive (rewritable disc preferred).
  4. Click Burn!
ISOBurn Screenshot - Files

ISOBurn Screenshot - Burning

How Optical Media are Burned
Programs like Nero that burn CDs use an SCSI pass-through interface to achieve this; that is, they use a driver to send raw SCSI commands to the system device and to cause it to write to the disk. In the NT family of Windows, the SCSI Pass-Through Interface (SPTI) was directly integrated into Windows, so a program could use Windows features to send such commands, with no need for additional drivers. Although this library by itself does not depend on any specific pass-through interface, the only implementation I have provided is that of SPTI, since other implementations like ASPI are usually layered above SPTI.

What This Library Does
The main problem with CD burning is that the Windows writing functions do not actually send write commands to multimedia devices like they do for hard disks. The program must thus send the commands by itself, and that is what disc burning applications do. This communication can become tedious without abstraction, and I made this library to allow programmers to access devices without worrying about the details of the communication (i.e. the marshaling and, to a certain extent, the data formats). This way programmers don't need to worry about the plumbing of the communication and can focus on the actual calls to the drive.

CodeProject
Please also visit the CodeProject site http://www.codeproject.com/script/Articles/Article.aspx?aid=49003 every once in a while. Though I will try to keep both updated, you should check that website too in case I forget.

Feedback
Please contact me if you have any questions or comments on improvements I could make on the library or this site. Thank you!

Last edited May 19, 2010 at 9:37 PM by OccumsRazor, version 27