Solved

cd-rom serial number

Posted on 1998-01-29
3
1,274 Views
Last Modified: 2013-11-20
Is there a way to access the serial number of a cd-rom?
0
Comment
Question by:mattkr
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
hasmet earned 100 total points
ID: 1315183
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
 
LVL 1

Expert Comment

by:hasmet
ID: 1315184
what happened to my points ?
0
 

Expert Comment

by:Rmartin32
ID: 10578043
How do you use this?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question