RegQueryValueEx problem

kmit
10-03-2001, 05:46 PM
keeps giving me a 0 for any value that I try to get.
my code looks like this, what am I doing wrong
r = RegOpenKey(Hkey, strPath, keyhand)
lResult = RegQueryValueEx(keyhand, strValue, 0&, lValueType, ByVal 0&, lDataBufSize)
If lValueType = REG_SZ Then
strBuf = String(lDataBufSize, " ")
lResult = RegQueryValueEx(keyhand, strValue, 0&, 0&, ByVal strBuf, lDataBufSize)
If lResult = ERROR_SUCCESS Then
intZeroPos = InStr(strBuf, Chr$(0))
If intZeroPos > 0 Then
getstring = Left$(strBuf, intZeroPos - 1)
Else
getstring = strBuf
End If
End If
End If
r = RegCloseKey(keyhand)

Banjo
10-04-2001, 04:09 AM
What values are you pssing to the RegOpenKey function?

KesleyK
10-04-2001, 08:56 AM
Please make replies to thread. Also, please address related follow-up questions in the same thread so people can find them more easily.

__________
HOOOaaaaa! Semper Fi!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum