Hi all,
I guess I'll use this list.
So, I've been wrestling with Win32 declares to do some registry stuff,
namely trying to read values on a remote machine. Locally all of my
calls are working fine, but so far no love on the remote machine.
With or without impersonation calls, the RegConnectEx function succeeds,
but the RegOpenKeyEx call fails with error 5, access denied. To try and
solve this I ended up adding calls to create credentials and, I think,
apply them to the current process.
So, in the Open event of the window, I make these calls-
LogonUser, which sets a handle
ImpersonateLoggedOnUser, which uses that handle
DuplicateToken
DuplicateHandle, using the duplicated token
Trying to piece this together, I tried running ImpersonateLoggedOnUser
after DuplicateToken, using the duplicated token, but it didn't seem to
make any difference. I also tried creating a local account on the other
machine and not making any of these calls, but without any change in
results.
Anyone have any ideas for me?
Thanks,
Fargo
_______________________________________________
Unsubscribe:
<[EMAIL PROTECTED]>