1

The question is similar to How do I read a disk directly with .Net?, except that the drive that requires direct access is a CD-ROM or DVD-ROM drive. These drives are not including as a physical drive and cannot be accessed using the DeviceStream class or CreateFile Win32 API method as cited in the topic above.

The Windows kernel automatically creates the internal device markers for various attached block devices. The first CD-ROM drive appears as \Device\CdRom0, though attempting to open this via CreateFile() will fail (apparently per http://support.microsoft.com/kb/235128).

Considering unmanaged applications can access these block devices natively (any CD-burning software, DD for Windows, Cygwin [via /dev/scdN]), is there a programmatic method available to access these block devices (preferably usable by .NET)?

Community
  • 1
  • 1
Michael
  • 3,821
  • 2
  • 19
  • 18

1 Answers1

0

You may want to look at this article This is what I used when faced with an issue of making backups to CD's

Mark Hall
  • 53,938
  • 9
  • 94
  • 111
  • I see how *DiscRecorder* allows me to open and get information about the current contents of the data. I'm not certain if it's going to let me read the contents however. It would seem to just get me specifics about session, length, etc. – Michael Nov 05 '10 at 21:48
  • I realized you were looking for something more low level than that after I posted. I will think about it somemore. – Mark Hall Nov 05 '10 at 22:19
  • I haven't tried this but there is a code project article on low level cdrom reading but it is using the Windows api to do it. http://www.codeproject.com/KB/cs/csharpripper.aspx – Mark Hall Nov 05 '10 at 22:34