Hi all…
I’ve a problem reading a DWORD value from the registry.
I’m using the static function getRegistryValue that returns a juce::String.
The value in the registry is a DWORD and the possible values are “0” or “1”.
I can’t figure out how to cast the String to int.
When the value in the registry is “0” the function seems to returnsan empty string. When “1” it returns a strange string…
I tried a lot of conversion and casting but nothing…
You can use String::getIntValue () or String::getLargeIntValue () to convert juce Strings to Integers. Not sure why you aren’t getting the correct values.
Have you checked if the entry is there in the register ?
Thank you all for your quick answers…
The code that you, Jules, posted solved the problem (I had only to add a String casting to the result assignement)…
result = (String)(int) *(DWORD*) buffer;
But now I’m having problems overriding this value whit setRegistryValue…
Reading your words and the code of the two methods I understand that those methods was really intended to handle just string, so maybe that’s why I cannot override the value!
Waiting for your news… i will try to find an hack to do my task!