View Single Post
Old Mar 1st, 2008, 10:36 PM   #14
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 545
Rep Power: 4 Ancient Dragon is on a distinguished road
Re: RegQueryValue Issues

>>Also the constant resizing of the buffsizes value is pointless being that they never change through out this
That's needed because RegEnumValue() changes the variable to the actual length of the text inserted into the destination buffer (the string may or may not be null-terminated). So you have to change it back to the original value before calling RegEnumValue() again.

Quote:
lpcbData
A pointer to a variable that specifies the size of the buffer pointed to by the lpData parameter, in bytes. When the function returns, this variable contains the size of the data copied to lpData.
__________________
True Terror is to wake up one morning and discover that your high school class is running the country - Kurt Vonnegut Jr.
Ancient Dragon is offline   Reply With Quote