I am trying to transplanting my programe from Windows Server 2003 to Windows
Server 2008. A question about WNetAddConnection2 has been found.
In my programe, I want to redirect a local device to the remote folder. The
local system and remote system's useraccount(Administrator) and password are
sameness.
On Windows Server 2003,the following source can be executed successfully.
WNetAddConnection2(&netSource,
“PSW”,
“.\\Administrator”,
CONNECT_REDIRECT);
On Windows Server 2008, the same code failed, the error code is
53(ERROR_BAD_NETPATH The network path was not found).
On Windows Server 2008, the third parameter changed to "Administrator", the
function call is success. The source is following.
WNetAddConnection2(&netSource,
“PSW”,
“Administrator”,
CONNECT_REDIRECT);
But, on MSDN doctument, there is no Remarks for Windows Server 2008.
I want to know why this function fails on Windows Server 2008, but on
Windows Server 2003,this call is success.
And, during ransplanting my programe from Windows Server 2003 to Windows
Server 2008, and so on problemes and so on API, I should give more attention
to?
Thannks!
|