Managed Windows API
MachineIdentifiers Class
Contains utility functions to determine values that are (almost) unique on each computer. These values can be useful for locking software to a machine.
Declaration Syntax
public static class MachineIdentifiers
All MembersProperties

Return the ID of all CPUs in this machine. Depending on BIOS configuration, CPU IDs might not be readable.

The DNS host name of this machine. Can be easily changed.

The Media Access Control addresses of all network adapters. Note that these values are the addresses loaded from the driver, and thus could have been set by the user. Having two network cards with same MAC connected to the same physical network segment will lead into trouble. Usually MAC addresses are burned into the PROM of a NIC, so this is no problem unless someone changes his MAC deliberately (for example) to bypass access restrictions.

The NetBIOS name of this machine. Can be easily changed; having two machines with same name on the same network can cause trouble with shared folders, though.

The security identifier of this machine. This id is generated at installation time (or when running tools like SysPrep or NewSid) and is used to generate security identifiers of local users and to authenticate the machine in a domain.

Get all network interfaces. Use them to get MAC addresses or IP addresses, or the MAC address that is used for connecting to a specific IP address.

Get the Volume Serial Numbers from all hard disk partitions. These values are part of the filesystem, and were originally intended to detect floppy swaps where the same floppy has been removed and inserted again (because, in this case, unwritten data may still be written). Today these are easily tweakable and of no real use, except for badly-designed software licensing schemes.

Inheritance Hierarchy

Assembly: ManagedWinapi (Module: ManagedWinapi) Version: (0.3)