Click here to Skip to main content
15,921,622 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create Registry Key with C++ Pin
J_E_D_I15-Aug-07 23:56
J_E_D_I15-Aug-07 23:56 
GeneralRe: Create Registry Key with C++ Pin
hxhl9516-Aug-07 14:15
hxhl9516-Aug-07 14:15 
QuestionRe: Create Registry Key with C++ Pin
J_E_D_I18-Aug-07 22:00
J_E_D_I18-Aug-07 22:00 
AnswerRe: Create Registry Key with C++ Pin
hxhl9519-Aug-07 7:16
hxhl9519-Aug-07 7:16 
QuestionRe: Create Registry Key with C++ Pin
J_E_D_I19-Aug-07 19:04
J_E_D_I19-Aug-07 19:04 
AnswerRe: Create Registry Key with C++ Pin
hxhl9520-Aug-07 5:45
hxhl9520-Aug-07 5:45 
QuestionRe: Create Registry Key with C++ Pin
J_E_D_I28-Aug-07 1:55
J_E_D_I28-Aug-07 1:55 
GeneralRe: Create Registry Key with C++ Pin
hxhl9528-Aug-07 6:49
hxhl9528-Aug-07 6:49 
You've got me stumped there...I'm not quite sure why it doesn't show the value, but here are a few suggestions that might help: instead of malloc(31), why don't you just do char* value=new char[31]? And check if the registry key exists first. I'd also recommend using RegCreateKeyEx() instead of RegOpenKeyEx(). CreateKey creates the key if it doesn't exist and opens the key if it does. That way, you can prevent an error from opening a non-existant key from happening.

For me, the code you have works fine when I try to use it to read a value from the registry...What do you mean by it doesn't "show" the value? You debugged it and when you got past the RegQueryValueEx function the value of value didn't change?
GeneralRe: Create Registry Key with C++ Pin
J_E_D_I28-Aug-07 20:15
J_E_D_I28-Aug-07 20:15 
AnswerRe: Create Registry Key with C++ Pin
hxhl9529-Aug-07 6:28
hxhl9529-Aug-07 6:28 
QuestionRe: Create Registry Key with C++ Pin
J_E_D_I29-Aug-07 21:55
J_E_D_I29-Aug-07 21:55 
QuestionRe: Create Registry Key with C++ [modified] Pin
hxhl9530-Aug-07 6:03
hxhl9530-Aug-07 6:03 
AnswerRe: Create Registry Key with C++ Pin
J_E_D_I1-Sep-07 21:06
J_E_D_I1-Sep-07 21:06 
AnswerRe: Create Registry Key with C++ Pin
hxhl952-Sep-07 6:22
hxhl952-Sep-07 6:22 
GeneralRe: Create Registry Key with C++ Pin
J_E_D_I3-Sep-07 4:19
J_E_D_I3-Sep-07 4:19 
AnswerRe: Create Registry Key with C++ Pin
hxhl953-Sep-07 8:10
hxhl953-Sep-07 8:10 
GeneralRe: Create Registry Key with C++ Pin
J_E_D_I3-Sep-07 19:34
J_E_D_I3-Sep-07 19:34 
AnswerRe: Create Registry Key with C++ Pin
hxhl954-Sep-07 14:03
hxhl954-Sep-07 14:03 
GeneralRe: Create Registry Key with C++ Pin
J_E_D_I4-Sep-07 20:35
J_E_D_I4-Sep-07 20:35 
GeneralRe: Create Registry Key with C++ Pin
J_E_D_I9-Sep-07 1:05
J_E_D_I9-Sep-07 1:05 
AnswerRe: Create Registry Key with C++ Pin
hxhl959-Sep-07 5:07
hxhl959-Sep-07 5:07 
Questionstring size according to user's input Pin
dona jain9-Aug-07 0:12
dona jain9-Aug-07 0:12 
AnswerRe: string size according to user's input Pin
Cedric Moonen9-Aug-07 0:16
Cedric Moonen9-Aug-07 0:16 
AnswerRe: string size according to user's input Pin
toxcct9-Aug-07 0:17
toxcct9-Aug-07 0:17 
GeneralRe: string size according to user's input Pin
dona jain9-Aug-07 0:19
dona jain9-Aug-07 0:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.