Solved

cd-rom serial number

Posted on 1998-01-29
3
1,269 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

862 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now