471,344 Members | 1,544 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Read binary value from registry???

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 GetMethodParameter("GetStringValue") but can't
find the method for binary, the MSDN documentation is terrible and doesn't
provide a list of possible parameters. any ideas would be appreciated. thanks
Jul 22 '05 #1
2 2450
actually i figured it out, i had to use stdregprov, but what i need now i to
convert a binary value into a date?

"lastusernameleft" wrote:
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 GetMethodParameter("GetStringValue") but can't
find the method for binary, the MSDN documentation is terrible and doesn't
provide a list of possible parameters. any ideas would be appreciated. thanks

Jul 22 '05 #2
Depends on how the date is stored in the binary format. In the past I saved
it as DateTime.Ticks and then just read it back that way. You could also
serialize it and store it as a byte array.

Regards,
John

"lastusernameleft" <la**************@discussions.microsoft.com> wrote in
message news:4F**********************************@microsof t.com...
actually i figured it out, i had to use stdregprov, but what i need now i
to
convert a binary value into a date?

"lastusernameleft" wrote:
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 GetMethodParameter("GetStringValue") but
can't
find the method for binary, the MSDN documentation is terrible and
doesn't
provide a list of possible parameters. any ideas would be appreciated.
thanks

Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by fabrice | last post: by
1 post views Thread by Borka | last post: by
8 posts views Thread by Saradhi | last post: by
4 posts views Thread by Wolfgang Kaml | last post: by
1 post views Thread by Steve Bostedor | last post: by
2 posts views Thread by lastusernameleft | last post: by
13 posts views Thread by dumpingrounds | last post: by

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.