what does subkey ref mean in GetKeyVal()

kmit
10-03-2001, 05:33 PM
Am trying to get the value for
HKLM\SYSTEM\CurrentControlSet\Control\Current User
using function GetKEyVAlue( , , , )

I understand It requires 4 parameters
root: HKEY_LOCAL_MACHINE is the root
key name: HKLM\SYSTEM\CurrentControlSet\Control\Currentus
SubKey refernce : what is subkey Reference?
VAlue of key.

anyone???

Volte
10-03-2001, 05:38 PM
i've never heard of GetKeyVal, but it maybe easier to use RegOpenKey and other related API functions. I recommend Apiguide (www.allapi.net) for this.

kmit
10-03-2001, 05:44 PM
didnt work either 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, 09:24 AM
What values are you passing to the RegOpenKey function?

KesleyK
10-04-2001, 09:30 AM
And you may look into the RegOpenKeyEx function instead...

__________
HOOOaaaaa! Semper Fi!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum