How to get PC ID

  • Thread starter Thread starter Mr.Tickle
  • Start date Start date
M

Mr.Tickle

Make a compound ID; bios ID, harddrive signiture, etc etc... and maybe ram
amount etc.
 
How can I get some of these IDs with C#

Well, you can use PInvoke and call the kernel32.dll libraries. For example,
to get the hard disk information, you could use GetVolumeInformation. Take a
look at this site for an example (it's in italian, but the C# code is
written in english):

http://www.visualcsharp.it/articoli/Pinvoke/hdinfo.asp

I hope that helps,
-JG
 
Hi,
I need to get an ID for the PC. It does not matter what ID: processor, Mac,
Hard disk, any kind of ID.

How can I get some of these IDs with C#

Ofer
 
While this is a good suggestion, it might be easier to just use the
classes in the System.Management namespace to access this information. They
provide an abstract for a good amount of information on the machine, and
would reduce the need for a number of disparate P/Invoke calls.

Hope this helps.
 
Back
Top