Getting serail number of a CD

Discussion in 'Mac Programming' started by ithil, Jul 9, 2006.

  1. ithil macrumors newbie

    Jul 2, 2006
    Hi all,

    How to get the serial number of a CD on Mac OS X? Is there any
    replacement for the function GetvolumeInformation which gives the
    serial number on Windows. If not how I can get a unique number that
    identifies the CD.

  2. HiRez macrumors 603


    Jan 6, 2004
    Western US
    I don't even think CDs have unique serial numbers by default, do they? I really don't know but I've not heard of such a thing, at least not in a general case. I suppose you could burn a number on the CD somewhere.
  3. ChrisBrightwell macrumors 68020


    Apr 5, 2004
    Huntsville, AL
    OS X uses a serial number?

    That's news to me, but I've used the Family Pack license since 10.2.
  4. Nermal Moderator


    Staff Member

    Dec 7, 2002
    New Zealand
    When you format a volume in DOS, it assigns it a 1024-bit serial number. It's done this for as long as I can remember (I started with DOS 3.3). In the case of a DOS-formatted floppy or hard drive, this number is recorded onto the disk - if you put the same disk into a different computer then you'll see the same serial. If you reformat the disk then you'll get a different serial.

    I have no idea whether Mac-formatted (or even Windows-formatted) CDs use serial numbers. I don't have a Windows computer on-hand to take a look.
  5. caveman_uk Guest


    Feb 17, 2003
    Hitchin, Herts, UK
    He means a different sort of serial number....:rolleyes:
  6. ipacmm macrumors 65816


    Jun 17, 2003
    Cincinnati, OH
    OS X Server uses serial numbers for each version.
  7. bousozoku Moderator emeritus

    Jun 25, 2002
    Gone but not forgotten.
    You mean something like this that's available from the Info button in Disk Utility?

    Attached Files:

  8. robbieduncan Moderator emeritus


    Jul 24, 2002
    That does not appear to be a CD!
  9. bousozoku Moderator emeritus

    Jun 25, 2002
    Gone but not forgotten.
    I said something like this.
  10. IJ Reilly macrumors P6

    IJ Reilly

    Jul 16, 2002
    I'm not sure if this is what the OP is after, but many people think that audio CDs have a unique serial number because of the way they are automatically indexed by GraceNote the moment you insert the CD into the computer (assuming you've got a live Internet connection of course). In fact, GraceNote relies on a combination of track number, track length, track order and (I believe) overall length to determine which CD you've inserted.
  11. Krevnik macrumors 68040


    Sep 8, 2003
    For audio CDs, this is true. Although IIRC, HFS+ volumes use a UUID. Now the question here is:

    What type of volume are you trying to get an ID for? HFS+, UDF, ISO9660, FAT, NTFS?

    UDF doesn't seem to include a UUID, and I would assume ISO9660 would also lack such a UUID. FAT is before GUIDs, so I have a feeling you won't get love there either, and OS X isn't aware of NTFS enough to read a GUID from that. Joliet is an unknown. HFS+ volumes all have UUIDs, from what I can tell, but I haven't done testing to see if it is truly unique between discs, and probably wouldn't be if they are pressed, but could be if they are all burnt.

    Now, IIRC, there is an actual UUID that pressed CDs have, and CD-Rs as well. HOWEVER, it isn't in any part of the block data available, but rather in a track that only the drive itself is allowed to read (since LBA 0 is /after/ this track, and addresses are unsigned). Drives can give access to read this, although I don't believe the drive is required to make the disc serial ID accessible. I know of a couple of devices (PS2, for example) which do use this information for anti-copy schemes.
  12. ithil thread starter macrumors newbie

    Jul 2, 2006
    Thanks for the help..
    I am porting a Windows application on Mac. I just want a replacement for the API "GetVolumeInformation" by which we can get the Unique number ( called serial number on Windows) for CD. Or is there a way to identify a CD (of any format) uniquely.

Share This Page