Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralReading the registry Pin
Shay Harel18-Aug-03 7:59
Shay Harel18-Aug-03 7:59 
GeneralRe: Reading the registry Pin
David Crow18-Aug-03 9:03
David Crow18-Aug-03 9:03 
GeneralRe: Reading the registry Pin
Shay Harel18-Aug-03 9:09
Shay Harel18-Aug-03 9:09 
GeneralRe: Reading the registry Pin
David Crow18-Aug-03 9:18
David Crow18-Aug-03 9:18 
GeneralRe: Reading the registry Pin
Shay Harel18-Aug-03 10:36
Shay Harel18-Aug-03 10:36 
GeneralRe: Reading the registry Pin
David Crow18-Aug-03 10:44
David Crow18-Aug-03 10:44 
GeneralRe: Reading the registry Pin
Shay Harel18-Aug-03 10:48
Shay Harel18-Aug-03 10:48 
GeneralRe: Reading the registry Pin
David Crow18-Aug-03 10:58
David Crow18-Aug-03 10:58 
Per MSDN, the third parameter to QueryValue is:

"[in, out] The size of the string data. Its value is initially set to the size of the szValue buffer."

So, you need to initialize lSize to the size of reg_read. However, reg_read.GetBuffer(0) is pretty useless in this case. I would opt for another value besides 0. Something like 256 should be enough to hold the value.

lSize = 256;
lReturn = regKey.QueryValue(reg_read.GetBuffer(lSize), "SYMMHOME1", &lSize);
regKey.Close();
if (ERROR_SUCCESS != lReturn)
   // do error stuff

GeneralDrag drop from my application to Windows Explorer Pin
Orantho18-Aug-03 7:57
Orantho18-Aug-03 7:57 
GeneralWinSOCK bind function. Pin
Søren Alsbjerg Hørup18-Aug-03 7:23
Søren Alsbjerg Hørup18-Aug-03 7:23 
GeneralRe: WinSOCK bind function. Pin
markkuk18-Aug-03 8:02
markkuk18-Aug-03 8:02 
GeneralRe: WinSOCK bind function. Pin
Søren Alsbjerg Hørup18-Aug-03 8:44
Søren Alsbjerg Hørup18-Aug-03 8:44 
GeneralRe: WinSOCK bind function. Pin
Rickard Andersson2018-Aug-03 10:12
Rickard Andersson2018-Aug-03 10:12 
GeneralCHtmlView and TIFF Pin
Archigal18-Aug-03 6:38
Archigal18-Aug-03 6:38 
GeneralRe: CHtmlView and TIFF Pin
Archigal19-Aug-03 7:04
Archigal19-Aug-03 7:04 
Questiondo truetype fonts have a unique ID ? Pin
JP GOBLET18-Aug-03 5:59
JP GOBLET18-Aug-03 5:59 
AnswerRe: do truetype fonts have a unique ID ? Pin
Terry O'Nolley18-Aug-03 13:21
Terry O'Nolley18-Aug-03 13:21 
GeneralRe: do truetype fonts have a unique ID ? Pin
JP GOBLET18-Aug-03 21:31
JP GOBLET18-Aug-03 21:31 
GeneralTo LOCALHOST or not to LOCALHOST Pin
Fei Lok18-Aug-03 5:45
Fei Lok18-Aug-03 5:45 
GeneralRe: To LOCALHOST or not to LOCALHOST Pin
Steve S18-Aug-03 22:27
Steve S18-Aug-03 22:27 
Generalset align for header control Pin
_skidrow_vn_18-Aug-03 5:18
_skidrow_vn_18-Aug-03 5:18 
GeneralRe: set align for header control Pin
David Crow18-Aug-03 9:08
David Crow18-Aug-03 9:08 
GeneralTree Control: add item without an image Pin
heranda200018-Aug-03 5:06
heranda200018-Aug-03 5:06 
GeneralRe: Tree Control: add item without an image Pin
Rage18-Aug-03 5:11
professionalRage18-Aug-03 5:11 
GeneralTraffic Control API Pin
pma18-Aug-03 4:56
pma18-Aug-03 4:56 

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.