We need a function written in Object Pascal that returns a short string that's unique for each computer (machine) it runs on (or at least the chance of two computers returning the same string has to be very low), and that doesn't change when replacing (most) hardware components and/or reinstalling the OS. The function will be used for a protection system in an application written in Delphi on Windows.
We know that creating a perfect such function is close to impossible, but we are looking for a solution that would work fairly well. The number of characters in the string is up to you, based on the solution that you find.