

Long p2 = (userRequestCodeDouble - 2) * (userRequestCodeDouble - 1) Long p1 = userRequestCodeDouble * userRequestCodeDouble - 2 * userRequestCodeDouble String thisComputerRequestCodeString = Convert.ToBase64String(thisComputerRequestCode) ThisComputerRequestCode = Convert.ToByte(c.ToString())
Hardware product serial number generator code#
Getting Serial NumberĬopy Code string thisComputerHddSerialNumber = GetHDDSerialNumber() īyte thisComputerRequestCode = new byte įoreach ( char c in thisComputerHddSerialNumber.ToArray()) So, When the user clicks on the GetRequestCode button, the button’s event handler get the HDD code from GetHDDSerialNumber method and convert it to Base64 string. For example, it can be used to enumerate all disk drives, network adapters, processes and many more management objects on a system, or to query for all network connections that are up, services that are paused, and so on. ManagementObjectSearcher is one of the more commonly used entry points to retrieving management information. ManagementObjectSearcher searcher = new ManagementObjectSearcher( " root\\CIMV2", " SELECT * FROM Win32_DiskDrive") įoreach (ManagementObject queryObj in searcher.Get()) This method uses the ManagementObjectSearcher class the included in System.Management namespace.Ĭopy Code private string GetHDDSerialNumber() There is a very simple method which returns the HDD hardware code.

Request Code has been created based on HDD hardware code. Using the codeĪs I described, the code includes the 3 part Confirming the serial number and request code with HDD hardware code. Generating the serial number based on HDD hardware code and 3. In this article, I will try to create a 3-part serial number based on HDD hardware code. As you know all of the hardware resources have their own unique serial number (Such as NIC, HDD and …) One of the most popular ways for creating the unique serial number for an application is creating a serial number based on hardware resources code.
Hardware product serial number generator download#
Download ApplicationSerialNumber.zip - 16.9 KBĬreating the serial number for a developed application is the common concern of all developers.
