Alrighty then, at first adding that first resize doesn't make it work. However there was a secondary one that was needed.
while(RegEnumValue(myKey, index, szValueName, &dwValueNameSize, 0,
&dwType, (byte *)szValueBuff, &dwValueBuffSize) == ERROR_SUCCESS)
{
cout << szValueName << " : " << szValueBuff << "\n";
index++;
dwValueNameSize = sizeof(szValueName);
dwValueBuffSize = sizeof(szValueBuff);
}
That one makes it work, I guess I saw the first one as pointless cause with or without it there was no further progress. But now that you mentioned that i guess the other one had to be resized also. That lists all of them with it.