cd-rom serial number

Is there a way to access the serial number of a cd-rom?
mattkrAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
hasmetConnect With a Mentor Commented:
void CVolinfoDlg::OnOK()
{
      // TODO: Add extra validation here

      CString diskno;
      CString label;
      CString drive;
      drive = "e:\\";  // assuming your e drive is cdrom
      char szVolBuf[255], szFileSys[255];
      unsigned char Serial[4];
      DWORD MaxComp, FileSys;
      ::GetVolumeInformation(
      drive,
      szVolBuf,
      sizeof(szVolBuf),
      (DWORD *)&Serial,
      &MaxComp,
      &FileSys,
      szFileSys,
      sizeof(szFileSys));
      diskno.Format("%02X%02X-%02X%02X", Serial[3], Serial[2], Serial[1], Serial[0]);
      label = szVolBuf;
      MessageBox(diskno,label);
      CDialog::OnOK();
}

0
 
hasmetCommented:
what happened to my points ?
0
 
Rmartin32Commented:
How do you use this?
0
All Courses

From novice to tech pro — start learning today.