![]() |
RegQueryValue Issues
I am trying to read from the registry and there is issues with trying to query it, it can get to where the value is located but it can't find the value for some odd reason. Here is the code I am currently running.
:
The value that it should be printing out 0611623CA8EFE3D880FF72E0F9A5AACDE5D9C171EAE2C6FDB6888BF7B5386DEE , however it can't find it even though it should be there. Any help with this? |
Re: RegQueryValue Issues
are you certain that's exactly the code you compiled? line 25 has syntax error -- you need to close the quote after "hexData.
|
Re: RegQueryValue Issues
Oops, but that isn't the exact code, I cut out the pieces that where for something else. (Mostly all the commented out parts of previous tries at getting it right.) But that is what i use for this specific part.
|
Re: RegQueryValue Issues
After fixing the quote error and adding that key/string value to my registry this is what you program prints
Quote:
|
Re: RegQueryValue Issues
No, if it was working properly it should find the registry and actually say
Quote:
|
Re: RegQueryValue Issues
I changed your program to call RegQueryKeyEx() and it works now
:
Quote:
|
Re: RegQueryValue Issues
Alrighty thank you, for some odd reason that didn't work before for me...But also you didn't do a '\n' after printing out the registry value. And thanks again for the help.
|
Re: RegQueryValue Issues
The code as posted could use a little clearning up, such as don't mix both cout and printf(). I didn't bother with that, especially since you said this is only a small part of some larger program.
|
Re: RegQueryValue Issues
I have a quick question about the same topic, how would i modify this if i was going to query multiple values that are in the same location?
|
Re: RegQueryValue Issues
RegEnumVal(). There is an example program near the bottom of that web page.
|
| All times are GMT -5. The time now is 4:10 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC