Multi line Registry Key

Hi,

I'm currenty working on an API for Windows CE and I saw a little thing I would like to be sure.
When I get a registry Key and recognize it as as multiline, I put everything in a list, but when I watch on it there is some values I can't see on Windows CE Remote Registry Editor.

  • This is my code sample:

case RegistryValueKind.MultiString:
List<string> L = new List<string>();
string[] values = (string[])Key.GetValue(RegNameIdea);
for (int j = 1; j < values.Length; j++)
L.Add(values[j]);

  • This is the values I get in my list:
"9,G"
"9,1FG"
"9,011,EFG"
"425"
""
"1"

"0"


  • This is the values I see on Windows CE RRE:
"9,G"
"9,1FG"
"9,011,EFG"
"425"


So, are the last 3 values of my list
some errors, or it's just Windows CE RRE who miss something

Thank you,

Regards,








Answer this question

Multi line Registry Key

  • tecolote

    Hi Vladimir,

    I think you'r right, it's a bug in RRE, I have made the test with this code sample and the registry key t is not display correctly.
    So maybe we need to open a bug report ;).

    Thanks,

  • StephenT

    Hello Nicolas.

    MSDN says that registry multiline string is an "Array of null-terminated strings, terminated by two null characters".

    In your case, I think, an empty string could be treated as that second null character. I mean RRE can treat it this way (especially if it's written on C/C++).

    However, it's just my thought... Try changing "" to " " and check the difference.


  • Multi line Registry Key