title: VB6 reading registry entry but no data returned
body: <p>newly signed up desperate user here.</p>
  
  <p>I left the programming business quite a while ago but now and then get asked to make some enhancements etc.</p>
  
  <p>I want to use the registry to store some file locations so the user doesn't have to specify them all the time. I want to store them under HKEY_LOCAL_MACHINE because there are multiple users.</p>
  
  <p>I have got the key created using RegCreateKeyEx, and a value has been entered into the key, with RegSetValueExString, so there is a key under HKEY_LOCAL_MACHINE called SUPPLIERFILE and it has the value "C:\Documents and Settings.." etc. </p>
  
  <p>However when I use RegQueryValueExString it doesn't work: the lpValue string is empty, although the cbdata does contain the length of the string I was expecting to find there. The error retured is 234, ERROR_MORE_DATA.</p>
  
  <p>I have tried using RegGetValue, because I thought maybe a non-null terminated string was the problem, but I haven't got RegGetValue in the api dll.</p>
  
  <p>Any suggestions would be gratefully received, even along the lines of how to terminate a string with a null.
  Thanks,
  Steve</p>