Reading binary registry key returns "nothing"
-
Hi, I am trying to read some system config from the registry. The config info is stored as a binary value of type "REG_RESOURCE_LIST". If I try read this value with o=registrykey.getvalue(), (with o being an object), o will be set to nothing. I can read a string key from the same group using the same command, and it works. It just always seems to fail on binary keys. The "GetValueKind" of this key type returns Unknown. Any idea what I am doing wrong? I've been googling for what seems like all morning, and I cant find a solution. [Modified to sort out a typo]
-
Hi, I am trying to read some system config from the registry. The config info is stored as a binary value of type "REG_RESOURCE_LIST". If I try read this value with o=registrykey.getvalue(), (with o being an object), o will be set to nothing. I can read a string key from the same group using the same command, and it works. It just always seems to fail on binary keys. The "GetValueKind" of this key type returns Unknown. Any idea what I am doing wrong? I've been googling for what seems like all morning, and I cant find a solution. [Modified to sort out a typo]
Hi, the RegistryValueKind Enumeration lists all data kinds supported by .NET, as well as Unknown for all the other ones. So you're out of luck. I suggest you use P/Invoke and call the Win32 functions directly (as was needed for all kinds other than REG_SZ before .NET 2.0). :)
Luc Pattyn [Forum Guidelines] [My Articles]
Voting for dummies? No thanks. X|
-
Hi, the RegistryValueKind Enumeration lists all data kinds supported by .NET, as well as Unknown for all the other ones. So you're out of luck. I suggest you use P/Invoke and call the Win32 functions directly (as was needed for all kinds other than REG_SZ before .NET 2.0). :)
Luc Pattyn [Forum Guidelines] [My Articles]
Voting for dummies? No thanks. X|
-
I was hoping not to have to do that. Oh hum. Thanks for the reply - at least it puts my mind at rest that I have not gone crazy... (I am just slowly on my way to being there! :) ) Thanks.
You're welcome.
Jasey9 wrote:
at least it puts my mind at rest that I have not gone crazy
I did not imply that, nor the opposite. :)
Luc Pattyn [Forum Guidelines] [My Articles]
Voting for dummies? No thanks. X|