Advertisement

Getting the HD serial number [OT]

Started by June 22, 2000 07:51 PM
5 comments, last by HellRaider 24 years, 5 months ago
Hiya, I'm not sure if I should be posting this message here, but here we go: How can I extract the serial number of the HD from which my program is running? Some friends of mine have done it using Assembly, but I'd like to do it using C++. Thanks in advance! Edited by - HellRaider on 6/22/00 8:08:23 PM
Hi!

Here is the small piece of code to get the HDD s/n

DWORD dwSerial = 0;
GetVolumeInformation("C:\\",NULL,0,&dwSerial,NULL,NULL,NULL,0);

The HDD s/n is stored in dwSerial, of course


I hope it will help you



BugKiller
www.bugkiller.net
Advertisement
That works of course, if you want the sissy way out

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

A wise man once said "A person with half a clue is more dangerous than a person with or without one."
-----------------------------A wise man once said "A person with half a clue is more dangerous than a person with or without one."The Micro$haft BSOD T-Shirt
Then, by all means, please enlighten all of us at GameDev and show us the "manly" way to retrieve the hard drive serial number.
Well, it was a light hearted joke, but the manly way would be to go low level and do all thw work yourself.

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

A wise man once said "A person with half a clue is more dangerous than a person with or without one."
-----------------------------A wise man once said "A person with half a clue is more dangerous than a person with or without one."The Micro$haft BSOD T-Shirt
Well, are you manly or not?!? Show us all how right now to prove your manhood...
Advertisement
Hmm...
I guess he probably doesn''t know how to but if he does, does it make the rest of us sissies?

This topic is closed to new replies.

Advertisement