Solved

cd-rom serial number

Posted on 1998-01-29
3
1,268 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
Comment Utility
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
Comment Utility
what happened to my points ?
0
 

Expert Comment

by:Rmartin32
Comment Utility
How do you use this?
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

743 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

11 Experts available now in Live!

Get 1:1 Help Now