the following code
HKEY pKey = NULL;
DWORD length = 0;
DWORD dwtype = REG_SZ;
LONG retVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE, HASH, 0, KEY_ALL_ACCESS, &pKey);
if(retVal == ERROR_SUCCESS)
RegQueryValueEx(pKey, USER_HASH, 0, &dwtype, (LPBYTE)&data, &length);
is supposed to grab string data from defined locations in the registry.
However when I output the data say like
MessageBox( NULL, data, "Blah", MB_OK)
the result is just a bunch of garbage characters instead of the string data.
Any ideas what i'm doing wrong