i trie don 50 thousand keys and it doesnt return data in the buffer
heres my code. i dont know whats wrong!!!, nothing but 0's in the buffer!!!

long Equ <:DWORD>
GetSettingString Proc, phKey :DWORD, pstrPathSTRPTR :DWORD,pstrValueSTRPTR :DWORD,lpBuffer long
Local lValueType :DWORD
Local lBuffer :DWORD

hcurkey1 dd 0
lDataBufferSize1 dd 0

pushad;sav regs

Invoke RegOpenKey,phKey, pstrPathSTRPTR,Addr hcurkey1

Invoke RegQueryValueEx,hcurkey1,pstrValueSTRPTR ,0,0, lpBuffer,Addr lDataBufferSize1
Invoke GetLastError
int 3
Invoke RegCloseKey,hcurkey1
mov ebx,lpBuffer
;int 3

GetSettingString EndP
returns 126 The specified module could not be found. ERROR_MOD_NOT_FOUND
Posted on 2002-06-04 21:36:41 by Qages
You must initialize lDataBufferSize1 with the size of buffer pointed to by lpBuffer BEFORE calling RegQueryValueEx. In your code, you initialized IDataBufferSize1 to 0 which told Windows that your buffer is 0 byte in size.
Posted on 2002-06-04 22:38:52 by Iczelion
Have a look at my platsdk addin for RadASM(the updated version). I use the registry to retrieve the path to the Platform SDK base directory.

The SDK recomends the use of RegOpenKeyEx over RegOpenKey
Posted on 2002-06-05 08:44:14 by MArtial_Code