Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

cd-rom serial number

Posted on 1998-01-29
3
Medium Priority
?
1,284 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 200 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

972 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