473,320 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How can I retrieve a binary value from the registry?

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!

Nov 16 '05 #1
3 4958
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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 16 '05 #2
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;

"ForestDemon" <li******@comcast.net> wrote in message
news:<75Kwd.675679$mD.343@attbi_s02>...
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!

Nov 16 '05 #3
thanks to those who replied...this worked out for me.

i truly appreciate the input!
Ciaran wrote:
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;

"ForestDemon" <li******@comcast.net> wrote in message
news:<75Kwd.675679$mD.343@attbi_s02>...

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!



Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jaakko Holster | last post by:
Lets run following code: ------- snip ------ class Perm { static $read = bindec('001'); static $write = bindec('010'); static $delete = bindec('100'); }
2
by: lastusernameleft | last post by:
What is the easiest .net method to read a REG_BINARY value from the registry? I'm using a ManagementClass from the System.Management namespace and can retrieve string values using...
7
by: Golan | last post by:
Hi, I need to convert a Binary value to Decimal. I've been told that the value is an unsigned one. How can I do this? I use memcpy into an unsigned char variable, but when I print the value I got...
1
by: zoltix | last post by:
Hi, How to retrieve a value in in an aspx page? Normally it is easy, drag and drops the textarea in aspx page and it is work. But in this case, I generate the html code manually () and put as...
2
by: yxq | last post by:
There are 8 bytes binary value stored date and time in Registry. 84 8B D7 DF 8B 28 C5 01 I want to convert the binary value to date using VB.NET. Dim a As FILETIME a.dwHighDateTime = 29698187...
6
by: Shawn B. | last post by:
Greetings, I've been up and down google on this one and clearly I don't know what search terms to use because I can't locate how to do this for binary values (or hex)... in C#, we can specify...
3
by: tfeller | last post by:
I would like to drop the leading 0x on a binary value so I can do a bitwise operation. Here is simplified code: select right(0x88186000,8) I expected to get back 88186000, this was not the...
21
by: giandeo | last post by:
Hello Experts. Is it possible to retrieve the value from a populated pull down menu from a database and then use that value to access the same database to get the related fields. Example: ...
12
by: waterdriven | last post by:
Hello; I am a newbie. A homework assignment was assigned and I am having trouble getting started. The assignment reads: Write a program to print out the binary value of a 16 bit number.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.