| | |
Ways to get a Computers "ID"
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 122
Reputation:
Solved Threads: 6
I have found a link:
http://www.codeguru.com/forum/showthread.php?t=249788
I think I will go for checking the BIOS SerialNumber. In the link it seems to fail when doing this on Windows 98 or earlier but if a fail meens an emty string like: "" that will work for my purpose.
They refer to get the BIOS Serial like below but when gooling on that, I am not sure if I can find anything helpful of how to return this serial number.
I use VC++ 2008 Express Edition
http://www.codeguru.com/forum/showthread.php?t=249788
I think I will go for checking the BIOS SerialNumber. In the link it seems to fail when doing this on Windows 98 or earlier but if a fail meens an emty string like: "" that will work for my purpose.
They refer to get the BIOS Serial like below but when gooling on that, I am not sure if I can find anything helpful of how to return this serial number.
I use VC++ 2008 Express Edition
C++ Syntax (Toggle Plain Text)
GetBIOSSerial(); //Is this a call, I cant find out if any namespace goes with this
Last edited by Liszt; May 16th, 2009 at 11:12 am.
•
•
Join Date: Oct 2008
Posts: 122
Reputation:
Solved Threads: 6
I have come up with a code that look like this that is supposed to return the motherboard serialnumber.
The number that is returned is: "123456789000"
I wonder if that really could be correct or perheps do I miss something in the code. I am looking for a unique serial number ?
The number that is returned is: "123456789000"
I wonder if that really could be correct or perheps do I miss something in the code. I am looking for a unique serial number ?
C++ Syntax (Toggle Plain Text)
ManagementObjectSearcher ^searcher; ManagementObjectCollection::ManagementObjectEnumerator ^queryEnum; ManagementBaseObject ^objMgmt; searcher = gcnew ManagementObjectSearcher("SELECT * FROM Win32_Baseboard"); ManagementObjectCollection ^queryCollection = searcher->Get(); queryEnum = queryCollection->GetEnumerator(); while(queryEnum->MoveNext()) { objMgmt = queryEnum->Current; MessageBox::Show(Convert::ToString(objMgmt->GetPropertyValue("SerialNumber"))); }
Last edited by Liszt; May 16th, 2009 at 3:04 pm.
•
•
Join Date: Oct 2008
Posts: 122
Reputation:
Solved Threads: 6
Yes, that would be more than nice.
I think this would be the complete testcode if I dont miss anything out.
I think this would be the complete testcode and see what this MessageBox returns.
You would have to add the reference System::Management in "Add New Reference"
using namespace System::Management;
I think this would be the complete testcode if I dont miss anything out.
I think this would be the complete testcode and see what this MessageBox returns.
You would have to add the reference System::Management in "Add New Reference"
using namespace System::Management;
C++ Syntax (Toggle Plain Text)
ManagementObjectSearcher ^searcher; ManagementObjectCollection::ManagementObjectEnumerator ^queryEnum; ManagementBaseObject ^objMgmt; searcher = gcnew ManagementObjectSearcher("SELECT * FROM Win32_Baseboard"); ManagementObjectCollection ^queryCollection = searcher->Get(); queryEnum = queryCollection->GetEnumerator(); while(queryEnum->MoveNext()) { objMgmt = queryEnum->Current; MessageBox::Show(Convert::ToString(objMgmt->GetPropertyValue("SerialNumber"))); }
Last edited by Liszt; May 16th, 2009 at 3:44 pm.
The part I replace most often: is the motherboard(usually in conjunction with PSU). Those thing short out all the time, and now I have piles of them!
So be wary about how you use that. The only reason I can find, to use it is to block suspected bots off something like a MMORPG for a few hours, till the lag drops.
So be wary about how you use that. The only reason I can find, to use it is to block suspected bots off something like a MMORPG for a few hours, till the lag drops.
"Jedenfalls bin ich überzeugt, daß der Alte nicht würfelt."
"I became very sensitive to what will happen to all this and all of us." -Two geniuses named Albert
"I became very sensitive to what will happen to all this and all of us." -Two geniuses named Albert
![]() |
Similar Threads
- Cannot Ping other computers in "edgeless network" configuration (Networking Hardware Configuration)
- google "keyword" question (Search Engine Optimization)
- Removal of "Home Search Assistant", "Search Extender", & "Shopping Wizard" (Viruses, Spyware and other Nasties)
- Wireless "B" networks not working anymore (Networking Hardware Configuration)
- I am unable to open the "Help" function in IE 6 Print Preview! (Web Browsers)
Other Threads in the C++ Forum
- Previous Thread: do CopyFile() DeletFile() function throw exception?
- Next Thread: Please Correct me
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock wordfrequency wxwidgets






