I have problem with getting value from binary registry key. My code so far is
string key = "UserPreferencesMask";
string key_place = @"Control Panel\Desktop";
RegistryKey root = Registry.CurrentUser;
root = root.OpenSubKey(key_place);
var byte_value = root.GetValue(key);
byte[] bytearray = byte_value as byte[];
//How can convert byte [] array to 64 bit binary string
klase.Close();
MessageBox.Show(binary_string);
I am stacked when i want
UserPreferencesMask
binary registry key to convert 64bit binary string . something like this from
9E3E078012000000
hex value to
1001111000111110000001111000000000010010000000000000000000000000
binary value
But if i build code which convert from hex to binary, i have wrong binary value if in hex number has first one or two or more zero numbers. Binary returns without first zero numbers, only count start from first byte value with 1 , and has no error if hex started with any other char,except 0 How can i solve problem ? I searched everywhere, but i found only hex to binary ., but this cause an error for me, and returned value aren't 64 bit value lenght. Thank's !