LONG RegOpenKeyEx(

HKEY hKey, // handle of open key
LPCTSTR lpSubKey, // address of name of subkey to open
DWORD ulOptions, // reserved
REGSAM samDesired, // security access mask
PHKEY phkResult // address of handle of open key




What should the format of my ,LPCTSTR lpSubKey, be

I mean if i am seraching in HKEY_LOCAL MACHINE does the function just get the next subkey or can my string be \enum\scsi\......

I guess I'm asking what is the proper text formating for the string when using this function.

Thanx in advance.
Posted on 2003-01-10 20:21:41 by IwasTitan
Well if your root key is HKEY_LOCAL MACHINE and the subkey your want to work on in HKLM is \enum\scsi\ then I would do the following:


push pReturnedKeyHandle ; DWORD buffer of the returned handle
push KEY_READ ; Only set what you need to do here
; read, write, etc....
push 0 ; reserved... reserved for what? MS,
; when are we going to use this?!?!?!
push oText ("enum\scsi") ; no need for foward or trailing slash
push HEKY_LOCAL_MACHINE ; root key or open key
call RegOpenKeyEx

Proper format is no foward or trailing slashes of the subkey

Does this help? Need more info, let me know... :)
Posted on 2003-01-10 21:02:55 by Gunner
I think i got the info i need from you post

So if i were to use a .code string it would be:

regstring db "enum\scsi",0

but not regstring db "enum\scsi\",0

right?

thanx

___________________________________
edit

; reserved... reserved for what? MS,
; when are we going to use this?!?!?!

LOL...when M$ says so
Posted on 2003-01-10 21:56:13 by IwasTitan
Correctamundo
Posted on 2003-01-10 22:13:27 by Gunner