How can I retrieve a binary value from the registry?

  • Thread starter Thread starter ForestDemon
  • Start date Start date
F

ForestDemon

i'm able to use the GetValue() function for string usage/manipulation,
but i can't figure out how to read/write a binary value to/from a key.

any help is greatly appreciated...thanks folks!
 
i'm able to use the GetValue() function for string usage/manipulation,
but i can't figure out how to read/write a binary value to/from a key.

Same way, but you retrieve or pass in a byte array instead of a
string.



Mattias
 
The binary values are read and written as byte arrays; e.g

Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.LocalMachine;

object res = rk.GetValue("a");

byte[] mybinaryvalue = (byte[])res;

i'm able to use the GetValue() function for string usage/manipulation,
 
thanks to those who replied...this worked out for me.

i truly appreciate the input!

The binary values are read and written as byte arrays; e.g

Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.LocalMachine;

object res = rk.GetValue("a");

byte[] mybinaryvalue = (byte[])res;

i'm able to use the GetValue() function for string usage/manipulation,

but i can't figure out how to read/write a binary value to/from a key.


any help is greatly appreciated...thanks folks!
 
Back
Top