Changelog: We should avoid to use the returned length of RegQueryValueW() calls because it has to be interpreted different depending on the registry value type (characters for REG_EXPAND_SZ, bytes for REG_SZ). In fact it is not needed - the returned strings are already null terminated