[RESOLVED] Write BINARY value to the registry?
I've never worked with Binary values, so I can't get this to work. I don't know how to write it, but when I open the registry, I want the Data to look exactly like this
http://legdotus.ueuo.com/yugi1.png
My code is
vb.net Code:
system.SetValue("flcrc", "82, 47, 89, 43, 01, a6, ed, 02, 30, 20, 92, 08, 72", _
RegistryValueKind.Binary)
But during runtime I get this error "The type of the value object did not match the specified RegistryValueKind or the object could not be properly converted."
which makes me guess I must not write the data in that form, but in some other form. What do I need to write to get the above data in a binary type value?
EDIT:
Solution:
So, I got the solution from another thread, what had do be done, was to declare the data as bytes with the ""New Byte () {xx,xx,xx,xx}"
But the most important thing was to add &H at the start of every single byte value, and the problem is then fixed.
vb.net Code:
system.SetValue("flcrc", New Byte() {&H82, &H47, &H89, &H43, &H1, &HA6, &HED, &H2, &H30, &H20, &H92, &H8, &H72}, RegistryValueKind.Binary)
Re: [RESOLVED] Write BINARY value to the registry?
If you have solved your problem, please post the solution here for others to see, in case someone with the same problem stumbles upon this thread.
Re: [RESOLVED] Write BINARY value to the registry?
Quote:
Originally Posted by
Atheist
If you have solved your problem, please post the solution here for others to see, in case someone with the same problem stumbles upon this thread.
Yeah, OK, done that.