Реестр и типы данных
Всё-таки Реймонд Чен умудряется сколько угодно скучные подробности устройства Винды излагать так кайфово и с такими милыми примерами, что невозможно не подароваться:
The registry itself doesn’t care if you lie and write two bytes of data to something you tagged as REG_DWORD. (Try it!) The type is just another user-defined piece of metadata. The registry dutifully remembers the two bytes you stored, and when the next person comes by asking for the data, those two bytes come out, along with the type REG_DWORD. Garbage in, garbage out. The registry doesn’t care that what you wrote doesn’t many any sense any more than the NTFS file system driver doesn’t care that you wrote an invalid XML document to the file config.xml. Its job is just to remember what you wrote and produce it later upon request.