|
-
Jun 19th, 2011, 09:09 AM
#1
Thread Starter
Addicted Member
[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

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)
Last edited by Legjendat; Jun 19th, 2011 at 09:57 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|