Hi, im traversing through the registry, taking the values of the keys and storing them as strings. I have discovered there are many different types. Some of these types are causing my filestream writer to fail. Is it possible to convert all of the below into a string form. The actual data value is not important, just the ability to differentiate between different values.
- DWORD
- ExpandString
- Binary (is this just the same as byte[] ?)
- MultiString
-
if (String.Compare(SubKey.GetValueKind(v[i]).ToString(), "String") == 0)
{
String s = SubKey.GetValue(v[i]).ToString();
RegistryKeyDataValue rkdv = new RegistryKeyDataValue(s);
rkdv.incrementNumberOfTimesUsed();
rkdv.setTypeOfData("S");
r.addDataValue(rkdv);
r.setCurrentDataValue(s);
String hash = "";
h.setHashData(hash);
hash = h.HashString(s);
}
I'm having problems later on because i want to write the values to a file and i need to convert all different types to a string.