Wow am I retarded. Forgot to put a ByRef in front of phkResult.
Also- wow, what a crap move to shutdown the mailing lists.
Fargo Holiday wrote:
Howdy everyone,
I wanted to be able to use remote registry calls, so I've been
fiddling around and found the proper declares to initiate a connection
and return an integer handle. That seems to work fine, returning 0 for
hosts that are valid targets and non-zero for bad hosts. Using the
handle returned seems to work fine for closing the connection. Now I'm
trying to actually read some keys, but haven't quite sorted that out.
I connect to the remote or local registry, then try to grab the key
handle with this:
Soft Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias
"RegOpenKeyExA" (ByVal hKey As Integer, ByVal lpSubKey As CString,
ByVal ulOptions As Integer, ByVal samDesired As Integer, phkResult As
Integer) As Integer
if System.IsFunctionAvailable("RegOpenKeyExA", "advapi32.dll") Then
dim q As Integer
q = RegOpenKeyEx(remoteHandle, "SOFTWARE", 0, &H20000,
remoteKeyHandle)
Return q
Else
Return 800
end if
remoteHandle is the handle returned by RegConnectRegistry, and which
seems to be populating fine since it works for the RegClose operation.
However, RegOpenKeyEx returns non-zero and doesn't populate
remoteKeyHandle.
Anyone here able to point me the right way?
Thanks,
Fargo
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe:
<[EMAIL PROTECTED]>
REAL Software has decided to consolidate this mailing list with the online Forums.
On Monday, February 12, 2007, this mailing list will no longer be active. We
encourage you to continue your REALbasic and REAL SQL Server discussions on the
Forums. If you are not presently a member of the forum, please sign up today at
<http://forums.realsoftware.com>.