|
-
April 25th, 2006, 04:16 AM
#1
Identify a cd-rom (is there a SID in a cd ?)
Hi,
I need to create an application which will be writted on many CD-ROM (10.000 cd), each cd is same as other, there isn't any possibility to write a different file on each cd,
But I need to authenticate each cd without needing a manual entry (serial number...) by user.
So, I'm looking if it exist a SID on each CD, like the MAC address for network card and how getting it in C++.
Thanks all.
-
April 25th, 2006, 04:45 AM
#2
Re: Identify a cd-rom (is there a SID in a cd ?)
Check out the fourth parameter: GetVolumeInformation()
Please don't forget to rate users who helped you!
-
April 25th, 2006, 04:59 AM
#3
Re: Identify a cd-rom (is there a SID in a cd ?)
and it will be enought ?
each number got on each cd will be different ?
-
April 25th, 2006, 06:34 AM
#4
Re: Identify a cd-rom (is there a SID in a cd ?)
I can only guess. The best thing would be to burn two exactly identical CDs and try it.
Please don't forget to rate users who helped you!
-
April 25th, 2006, 06:36 AM
#5
Re: Identify a cd-rom (is there a SID in a cd ?)
Yes, I'll do that to check,
thanks.
-
April 27th, 2006, 07:00 AM
#6
Re: Identify a cd-rom (is there a SID in a cd ?)
How getting the drive where is running the .exe ?
thx
-
April 27th, 2006, 09:23 AM
#7
Re: Identify a cd-rom (is there a SID in a cd ?)
You can use GetDriveType() to check every drive letter until you get a CD-drive.
Please don't forget to rate users who helped you!
-
April 27th, 2006, 10:01 AM
#8
Re: Identify a cd-rom (is there a SID in a cd ?)
I got it
Code:
if(::GetCurrentDirectory(sizeof(szDir) - 1, szDir)){
driver = szDir;
p = driver.Find("\\");
driver = driver.Left(p+1);
driver.MakeUpper();
bSuccess= GetVolumeInformation( driver, szVolName,MAX_PATH,
&dwVolSerialNumber,
&dwMaxNameLength,
&dwFileSystemFlags,
szSystemName,MAX_PATH);
}
But are you sure this number is really single ?
it's composed of 10 numerics digits so it allow 10.000.000.000 - 1 possibilities, I thinks it's a little bit small for all of us seeing each CD are burnst each days
-
April 27th, 2006, 12:51 PM
#9
Re: Identify a cd-rom (is there a SID in a cd ?)
The number is DWORD which is 32 bit = 4 byte = 4.294.967.296 different values possible.
But besides this I can not guarantee anything, because I am no serial number specialist. Hopefully you will find one.
EDIT: The question is not if there exists a CD with the same serial number anywhere on the world, but if it is possible for a person without much effort to create a CD with an arbitrary serial and if he can also get to know what number he has to use.
Last edited by philkr; April 27th, 2006 at 12:57 PM.
Please don't forget to rate users who helped you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|