![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2008
Posts: 25
Rep Power: 0
![]() |
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.
C++ Syntax (Toggle Plain Text)
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? |
|
|
|
|
|
#2 |
|
PFO God In Training
![]() Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 530
Rep Power: 4
![]() |
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.
__________________
I Like Ike. Vote for Dwight Eisenhower this November. --This message brought to you by the the Procrastinators Club Of America. |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Mar 2008
Posts: 25
Rep Power: 0
![]() |
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.
|
|
|
|
|
|
#4 | |
|
PFO God In Training
![]() Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 530
Rep Power: 4
![]() |
Re: RegQueryValue Issues
After fixing the quote error and adding that key/string value to my registry this is what you program prints
Quote:
__________________
I Like Ike. Vote for Dwight Eisenhower this November. --This message brought to you by the the Procrastinators Club Of America. |
|
|
|
|
|
|
#5 | |
|
Newbie
Join Date: Mar 2008
Posts: 25
Rep Power: 0
![]() |
Re: RegQueryValue Issues
No, if it was working properly it should find the registry and actually say
Quote:
|
|
|
|
|
|
|
#6 | |
|
PFO God In Training
![]() Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 530
Rep Power: 4
![]() |
Re: RegQueryValue Issues
I changed your program to call RegQueryKeyEx() and it works now
cplusplus Syntax (Toggle Plain Text)
Quote:
__________________
I Like Ike. Vote for Dwight Eisenhower this November. --This message brought to you by the the Procrastinators Club Of America. |
|
|
|
|
|
|
#7 |
|
Newbie
Join Date: Mar 2008
Posts: 25
Rep Power: 0
![]() |
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.
|
|
|
|
|
|
#8 |
|
PFO God In Training
![]() Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 530
Rep Power: 4
![]() |
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.
__________________
I Like Ike. Vote for Dwight Eisenhower this November. --This message brought to you by the the Procrastinators Club Of America. |
|
|
|
|
|
#9 |
|
Newbie
Join Date: Mar 2008
Posts: 25
Rep Power: 0
![]() |
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?
|
|
|
|
|
|
#10 |
|
PFO God In Training
![]() Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 530
Rep Power: 4
![]() |
Re: RegQueryValue Issues
RegEnumVal(). There is an example program near the bottom of that web page.
__________________
I Like Ike. Vote for Dwight Eisenhower this November. --This message brought to you by the the Procrastinators Club Of America. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| LWP form Data array issues | Johnmcter | Perl | 0 | Feb 13th, 2008 2:21 PM |
| Intermittent issues | blud | Community Announcements and Feedback | 3 | Nov 2nd, 2007 8:46 AM |
| Table issues... | Glastea | HTML / XHTML / CSS | 2 | Jan 12th, 2007 1:54 AM |
| I have an idea, but copyright issues. | Booooze | Project Ideas | 25 | Aug 3rd, 2006 9:31 PM |