Link to home
Start Free TrialLog in
Avatar of h_mohsenian
h_mohsenian

asked on

Read CD Serial Number by code

Dear friends,

you can see a serial number( I guess it is the Serial Number) at the face of a CD when you buy a Empty CD ( for write ). is it realy the S/N ? if yes, is there any way to read it by code ? I used GetVolumeInformation API function. but it got me the Volume S/N which is not my need. I need It for CD copy Protection.

best regards
Hamed
ASKER CERTIFIED SOLUTION
Avatar of Cesario Lababidi
Cesario Lababidi
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lee_Nover
Lee_Nover

you can't really use that S/N as cd copy protection
the thing is everytime you write to a CD it changes !!
so you might think of another protection

a good protection utility is ProActivate from TurboPower
http://www.turbopower.com/products/proactivate/
Avatar of Manuel Lopez-Michelone
listening...
hi there!

what happens  when you copy a complete CD. Is this a bit to bit perfect copy? or there is a way to find out if the CD is a copy or an original?

best regards
Manuel Lopez (lopem)
Avatar of h_mohsenian

ASKER

thanks for all,

1.Cesario:
I have a problem with your code, you have this line :

 mp.FileName := 'D:';

my CD drive is "H:" , and I guess I should changed your code as :
 
mp.FileName := 'H:';

am I right ? but there is not any difference in result. infact it shows the same Number that if I use "C:" , "D:" and other HDD drives.

can you tell me what is the problem ?

---------------------------------------------------

Lee_Nover :

you are right, after each CD write the S/N changes ( the S/N which can be read by GetVolumeInformation ) but S/N CD protection was my recomendation to one of my friends :p :D , there for I have to find a similar way ;-) .

lopem :
I dont know , but I think about Files copy it must be a byte to byte copy like our Block read write in pascal. ( just I guess ).

Hamed
the .Filename part should be :='d:\' .. don't forget the backslash
I tested again by BACKSLASH. but there was not any differance in Result ( again I saw equal Numbers for HDD drievs and CD Driv ).
I test it again by two different CD and it works. infact BACKSLASH was not important. it works just by CD Dirve and HDD Drive Char is not works. infact i saw a more interesting result . THE DRIVE SETTING IS NOT IMPORTANT, it means that I checked this by 'C:' not 'H:' and it got me the CD Number again :-))) . I recomend you to test it yourself.

anyways, As I said it worked and got me a different number for two different CD. but now I have a question, are you sure that by CD writing it will not changed ( like Volume serial Number that I mentioned above ). and also is it a unique number for each CD ??? I will test the first question ( S/N change with write ) but I can not test the second question ( the unique number )

thanks
Hamed
buy a pack of cd's ... they will probably be of the same production class
with disks this results in them having the same ID
dunno bout CDs .. you'll just have to check