The Old New Thing

How can I generate a consistent but unique value that can coexist with GUIDs?

A customer needed to generate a GUID for each instance of a hardware device they encounter: The serial number for each device is 20 bits long (four and a half bytes). We need to generate a GUID based on each device, subject to the constraints that when a device is reinserted, we generate the same GUID for it, that no two devices generate the ...