Mac OS X Reference Library Apple Developer Connection spyglass button

Version: 1.4

Posted: 2006-01-31

Build Requirements: Project Builder 2.1 or Xcode 2.1

Runtime Requirements: Mac OS X 10.2 or later

View Source Code:

Download Sample Code (“CDROMSample.zip”, 17.8K)



Description

This command-line tool demonstrates how to find and read sectors from CD-ROM media on Mac OS X. Techniques shown are: finding ejectable CD-ROM media, locating the BSD /dev/rdisk* node name corresponding to that media, opening the /dev/rdisk* node, retrieving the media's preferred block size, reading a sector from the media, and closing the device.

This sample code has been updated to include a project that produces a universal binary. No code changes were required for it to run correctly on the Developer Transition Systems.

Document Revision History

Date Notes
2006-01-31Updated to produce a universal binary. No code changes were required. Use kIOMasterPortDefault instead of older IOMasterPort function.
2003-01-14Demonstrates how to find CD-ROM media and read sectors from that media on Mac OS X.
Did this document help you? Yes It's good, but... Not helpful...