Hi,
i can't manage to get registry-values on 64bit, too.
I'm testing on Windows Vista x64.
Maybe someone can help me out?
This is my code:
var ROOT_KEY
var SUB_KEY
var VALUE
!define RegOpenKeyEx "Advapi32::RegOpenKeyEx(i, t, i, i, *i) i"
!define RegQueryValueEx "Advapi32::RegQueryValueEx(i, t, i, *i, i, *i) i"
!define KEY_QUERY_VALUE 0x0001
!define KEY_ENUMERATE_SUB_KEYS 0x0008
!define KEY_WOW64_64KEY 0x100
!define REG_SZ 1
Function ReadReg64
Pop $R2
Pop $R1
Pop $R0
StrCpy $ROOT_KEY $R0
StrCpy $SUB_KEY $R1
StrCpy $VALUE $R2
StrCpy $0 ""
StrCpy $1 ""
StrCpy $2 ""
StrCpy $3 ""
SetPluginUnload alwaysoff
System::Call "${RegOpenKeyEx}($ROOT_KEY, '$SUB_KEY', \
0, ${KEY_QUERY_VALUE}|${KEY_WOW64_64KEY}, .r0) .r3"
MessageBox MB_OK "Result of RegOpenKeyEx: $3"
System::Alloc 4096
Pop $1
System::Call "${RegQueryValueEx}(r0, '$VALUE', 0, ${REG_SZ} , r1, 4096) .r3"
MessageBox MB_OK "Result of RegQueryValueEx: $3"
MessageBox MB_OK "Value: $1"
System::Free $1
FunctionEnd
As "Result of RegOpenKeyEx i always get 0 and as "Result of RegQueryValueEx" 0, too, which means, that there were no errors. But when i try to show the value, i see the adress of $1, not the correct value of my reg-key.
Testing it on Windows 2000 x86 (without the KEY_WOW64_64KEY flag) brought the same results.
Cheers,
Hütte