Disk serial number

There is some ways to find out the hard disk serial number? And if yes, how? Maybe with a Win NT API or some MFC funcs?
Thans to everyone.
pFaz69Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pFaz69Author Commented:
Thanks i meant.
0
dhymesCommented:
You can find some some sample source code at the following URL.


http://www.programmersheaven.com/zone3/cat35/1859.htm

Hope this helps
0
dhymesCommented:
O, and when you get there you will need to look for a file called dugide10.zip. This file will show you exactly how do what you need.

Regards,
Dave
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

pFaz69Author Commented:
the page has been moved and i can't find dugide10.zip
0
pFaz69Author Commented:
OK i found it. That would be exactly what i was looking for, but unluckily it doesn't work.
0
dhymesCommented:
Ok, but why does it not work?
0
nietodCommented:
Hard disks don't necessisarily have a serial number and don't necessarily provide any mechanism for obtaining it from the software.  (Just because its stamped on the outside doesn't mean the computer can learn about it).  But many manufacturers do provide a serial number, but how that is obtained depends on the manufacturer, so writting a generic device driver to obtain it from any manufacturer can be a big challenge.  There was one posted a few months ago but the client who got it said it didn't work at all, and I'm not surprised.

You can use GetVolumeInformation() to get a volume number for a volume on a drive, but this is not the same thing.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pFaz69Author Commented:
dhymes, i don't know why it doesn't work: i just double-clicked on exe and the program terminates telling me nothing. I also looked at the code and i saw what the program is suppoosed to do, but it ends before.
0
dhymesCommented:
I would recommend writing a stub program, then compile and run the program through your debugger and find out what statement is failing.

Dave
0
pFaz69Author Commented:
in VC++ i can't compile it; the header <bios.h> doesn't exist
0
pFaz69Author Commented:
nietod, maybe we didn't understand perfectly each other, but anyway GetVolumeInformation() is good.
0
nietodCommented:
I'm not sure what wasn't understood.  But GetVolumneInformation() is rarely what people want (that's why I didn't answer).  The volumne number is not like a serial number.  It is not "set in stoine".  The user can change it for example.  Also there may be more than one volume per drive.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.