WNetAddConnection2() fails with ERROR_NO_NETWORK
From: Sharon (Eikenberry) Cutter (Sharon.Cutter_at_oracle.com)
Date: 03/26/04
- Next message: Slava M. Usov: "Re: Getting a list of logged on users and hosts"
- Previous message: Andrew Chalk: "Re: Getting a list of logged on users and hosts"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 26 Mar 2004 16:44:48 -0500
I have a small test program that fails at a customer site. The test
program is being run on machine A in DOMAIN-A. It calls LogonUser()
with an id and password from DOMAIN-B. It then calls
ImpersonateLoggedOnUser(), and then calls WNetAddConnection2() to make a
null connection to the IPC$ share on the domain controller for
DOMAIN-B. The call to WNetAddConnection2() fails with error
ERROR_NO_NETWORK.
The machine is running Windows 2000 sp3. The same program runs fine if
the LogonUser() and ImpersonateLoggedOnUser() calls are removed, so that
it is simply executing as the user logged on to the desktop -- the
connection to the IPC$ share on DOMAIN-B succeeds.
Does anyone have any ideas on why the network would seemingly become
unavailable after calling LogonUser and ImpersonateLoggedOnUser? The
test program works fine on other machines.
Thanks,
--Sharon
- Next message: Slava M. Usov: "Re: Getting a list of logged on users and hosts"
- Previous message: Andrew Chalk: "Re: Getting a list of logged on users and hosts"
- Messages sorted by: [ date ] [ thread ]