|
-
August 24th, 1999, 11:45 AM
#1
problem with reading registry value in VB
i kept getting memory error ('mem could not be read') when i used the following to query a registry value:
----
r1 = RegOpenKeyEx( HKEY_CURRENT_USER, "RemoteAccess", 0, KEY_QUERY_VALUE, phkResult)
if r1= ERROR_SUCCESS then
l= 50
subkey = "myteststringval"
r2 = RegQueryValueEx( phkResult, subkey$, 0, REG_EXPAND_SZ, data, l )
'I got the above mem error when stepping over this statement and couldn't proceed
...
...
RegCloseKey(phkResult)
----
all consts and declares has been made.
can anyone give me a hint why the memory error always come up ? each time
i succeeded in opening the key but failed on the query...
thanks in advance to any help, will appreciate it.
Ying
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|