I am working on a project where my code works fine on windows NT but does not return a value from the registry when used on Win XP. The specifc part that is not returning a value on XP but is on NT is the RegQueryValueEXString function:
sValue = String(cch, 0)
lrc = RegQueryValueExString(lhKey, szValueName, 0&, lType, _ sValue, cch)
If lrc = ERROR_NONE Then
vValue = Left$(sValue, cch – 1)
Else vValue = Empty
End If
The vValue parameter is blank now on XP but the same code reads the registry fine and fills this variable in NT. Anyone have any suggestions?