Link to home
Start Free TrialLog in
Avatar of earlrainer
earlrainer

asked on

Unique indentifiers like MAC address, CPU serial number

Hi Guys,

 There are a lot of posts on EE and on the net as well ,that deal with how to get unique system identifiers of a system, but the problem is that none of these tips seem to work(like some work on win9x,but not on win2k)

Can anyone show me how to get the following in delphi
1.MAC address
2.motherboard serial number (or is it the BIOS number)
3.CPU serial number.

I have got a way to get the hard disk serial number,but thats not what I am looking for.

I promise to increase the points to 250,as I am short of points now.

Thanks

ASKER CERTIFIED SOLUTION
Avatar of geobul
geobul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of earlrainer
earlrainer

ASKER

Hi Geo,

 On win2000 it gives an error saying netbios.dll not found.

I am not sure what this error is?
Hi,

Netbios function uses 'netapi32.dll' from your WINNT/system32 directory. I have that dll here in my Win2000.

Regards, Geo
Hi Geo,

 Thanks ,it works on Win2k ,
but some problem on win98 it returns 'mac not found'.

any idea about getting the motherboard\Bios serial nmber and the CPU number.

appreciate your help.Thanks
It might be. I have no 98 here for testing.

About BIOS and CPU: I'm sorry I have no idea. I'm not sure whether all CPUs have some kind of unique number.

Regards, Geo
you said "how to get unique system identifiers"  i can say that MAC is not unique at least on xp you can easily scange it to that ever you like
so be carefull using it.
How can I get MAC on Win98?. Thanks!
If you use the code posted by gobul you will have to install (in network ) the netbios protocol parts in windows 98.

I forgot to mention you can also uuse this function to get your mac address

  g: TGUID;
  CoCreateGUID(g);

Use the bytes inreturn string bytes 2 to 7 as the address.

If you have a network card installed then the system uses the harware address from that card which is unique.

If you do not have a network card then the system generates its own internal number .
This must be the best explanation I have found on the net for this function

http://bdn.borland.com/article/0,1410,26040,00.html