| Home | Previous Lesson: Need For Registry Next Lesson: Predefined Keys |
The registry stores data in a hierarchically structured tree. The tool that allows you to see this is called the Registry Editor. Each key can contain children known as subkeys and data entries called values.
Keys don't have to have values associated with them. Sometimes, all that the application needs to know is that the key exists; other times, an application may need many values to be associated with a specific key. A key can have any number of values, and the values can be in any form.
Keys have names just like a variable. Key names can consist of one or more printable ANSI characters (values ranging from 32 through 12) and cannot include spaces, backslashes, or wildcard characters (* and ?). This means that you can name both your dog and your key "Spot" if you so desire. Key names beginning with a period (.) are reserved. These names are not localized into other languages; however, values associated with the keys may or may not be localized. Subkeys also have names, and the name must be unique with respect to the key immediately above it in the hierarchy.
The registry supports several different data types for values. Your application can use any of these data types, depending upon what you want to store. Table 1 contains a list of the different data types supported.
|
Data type |
Description |
|
REG_BINARY |
Binary data in any form. |
|
REG_DWORD |
A 32-bit number. |
|
REG_DWORD_BIG_ENDIAN |
A 32-bit number in big-endian format. |
|
REG_DWORD_LITTLE_ENDIAN |
A 32-bit number in little-endian format. This is the most common format for computers running Windows NT. |
|
REG_EXPAND_SZ |
A null-terminated string that contains unexpanded references to environment variables (for example, %PATH%) |
|
REG_LINK |
A Unicode symbolic link. |
|
REG_MULTI_SZ |
An array of null-terminated strings, terminated by two null characters. |
|
REG_NONE |
No defined value type. |
|
REG_RESOURCE_LIST |
A device-driver resource list. |
|
REG_SZ |
A null-terminated string. |
| Home | Previous Lesson: Need For Registry Next Lesson: Predefined Keys |