Click here to Skip to main content
15,891,607 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Is there something like a CD/DVD GUID and how to obtain it if yes? Pin
Code-o-mat10-Nov-10 9:14
Code-o-mat10-Nov-10 9:14 
GeneralRe: Is there something like a CD/DVD GUID and how to obtain it if yes? Pin
David Crow10-Nov-10 9:39
David Crow10-Nov-10 9:39 
GeneralRe: Is there something like a CD/DVD GUID and how to obtain it if yes? Pin
Code-o-mat10-Nov-10 9:48
Code-o-mat10-Nov-10 9:48 
AnswerRe: Is there something like a CD/DVD GUID and how to obtain it if yes? Pin
Chris Meech10-Nov-10 9:58
Chris Meech10-Nov-10 9:58 
GeneralRe: Is there something like a CD/DVD GUID and how to obtain it if yes? Pin
Code-o-mat10-Nov-10 10:48
Code-o-mat10-Nov-10 10:48 
JokeRe: Is there something like a CD/DVD GUID and how to obtain it if yes? Pin
Peter_in_278010-Nov-10 11:18
professionalPeter_in_278010-Nov-10 11:18 
GeneralRe: Is there something like a CD/DVD GUID and how to obtain it if yes? Pin
Code-o-mat10-Nov-10 21:24
Code-o-mat10-Nov-10 21:24 
AnswerRe: Is there something like a CD/DVD GUID and how to obtain it if yes? Pin
Luc Pattyn10-Nov-10 12:16
sitebuilderLuc Pattyn10-Nov-10 12:16 
This scheme might work for a limited set-up; it basically tries to identify a CD by hashing as few sectors as possible.

1. have a central database that stores one record per CD, holding a unique ID (auto assigned), a sectorCount number, and a CRC number. Also have a table that holds one number: numberOfSectors (it will start at 1, and increase monotonically over time).

2. have an app that allows to add new CDs to the system.

3. have a library that supports the recognition of known CDs.


The add-a-new-CD algorithm would be like so:

1. read first few sectors (as determined by numberOfSectors).
2. for all occurring values of sectorCount, calculate CRC, and search DB for a match.
3. if none found, simply add the new disk, and terminate.
4. if one found with sectorCount<numberOfSectors, flag it as no longer valid; add the new disk; goto 5.
5. for the flagged disks, re-process them (this will yield a new CRC over a larger number of sectors).

The recognize-a-CD algorithm would be like so:

1. read first few sectors (as determined by numberOfSectors).
2. for all occurring values of sectorCount, calculate CRC, and search DB for a match.
3. if one found, that is it.
4. if none found, this is an unknown CD, you can't handle it, you need the aad-a-new-CD algorithm.


Possible refinement:
on top of the above, you could also store the "total CRC" of a CD, so when one isn't recognized according to the above, you could still recognize it by brute force, then suggest the user officially adds it to the DB.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


modified on Wednesday, November 10, 2010 6:59 PM

GeneralRe: Is there something like a CD/DVD GUID and how to obtain it if yes? Pin
Code-o-mat10-Nov-10 21:36
Code-o-mat10-Nov-10 21:36 
GeneralRe: Is there something like a CD/DVD GUID and how to obtain it if yes? Pin
Luc Pattyn10-Nov-10 23:23
sitebuilderLuc Pattyn10-Nov-10 23:23 
QuestionSendMessage(WM_VSCROLL,SB_LINEDOWN,0) don't work Pin
mesajflaviu10-Nov-10 2:06
mesajflaviu10-Nov-10 2:06 
AnswerRe: SendMessage(WM_VSCROLL,SB_LINEDOWN,0) don't work Pin
Adam Roderick J10-Nov-10 2:21
Adam Roderick J10-Nov-10 2:21 
GeneralRe: SendMessage(WM_VSCROLL,SB_LINEDOWN,0) don't work Pin
mesajflaviu10-Nov-10 2:54
mesajflaviu10-Nov-10 2:54 
GeneralRe: SendMessage(WM_VSCROLL,SB_LINEDOWN,0) don't work Pin
Adam Roderick J10-Nov-10 16:54
Adam Roderick J10-Nov-10 16:54 
QuestionOpenThemData() return Null Pin
dhakshayani_p10-Nov-10 1:35
dhakshayani_p10-Nov-10 1:35 
AnswerRe: OpenThemData() return Null Pin
Code-o-mat10-Nov-10 4:44
Code-o-mat10-Nov-10 4:44 
QuestionTAPI related forums...?? Pin
AmbiguousName9-Nov-10 23:37
AmbiguousName9-Nov-10 23:37 
AnswerRe: TAPI related forums...?? Pin
Adam Roderick J10-Nov-10 1:06
Adam Roderick J10-Nov-10 1:06 
Questionhow can fix number of lines in multiline edit box? Pin
Le@rner9-Nov-10 22:16
Le@rner9-Nov-10 22:16 
AnswerRe: how can fix number of lines in multiline edit box? Pin
Code-o-mat9-Nov-10 23:00
Code-o-mat9-Nov-10 23:00 
AnswerRe: how can fix number of lines in multiline edit box? Pin
Adam Roderick J10-Nov-10 2:31
Adam Roderick J10-Nov-10 2:31 
GeneralRe: how can fix number of lines in multiline edit box? Pin
Le@rner10-Nov-10 17:43
Le@rner10-Nov-10 17:43 
Questionconverting decimal to whole number Pin
rezen859-Nov-10 21:11
rezen859-Nov-10 21:11 
AnswerRe: converting decimal to whole number Pin
Cedric Moonen9-Nov-10 21:25
Cedric Moonen9-Nov-10 21:25 
GeneralRe: converting decimal to whole number Pin
rezen859-Nov-10 22:18
rezen859-Nov-10 22:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.