WindowsRegistry incorrectly handles root key abbreviations


#1

As can be seen in /modules/juce_core/native/juce_win32_Registry.cpp, the RegistryKeyWrapper only attempts to read keys if they start with full length names like HKEY_LOCAL_MACHINE. Commonly, this is abbreviated to HKLM. This perhaps wouldn't be a problem if JUCE itself didn't do this, like in modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp in function getDefaultLocationsToSearch(), where it attempts to read HKLM keys.


So probably either fix all places that reads abbreviated keys (no clue about how many), or modify RegistryKeyWrapper to accept this behaviour.

Regards


#2

Thanks - I didn't realise those abbreviations were there in the VST code, I'll certainly turn them into the full names.

As for whether the registry code should accept abbreviations.. Not sure, really, I don't think it's necessary, but I'll at least add an assertion if you try to call it with an unknown prefix..


#3

Okay, thanks for fixing it.