Networking Forums

Networking Forums > Computer Networking > Windows Networking > Why WNetAddConnection2 function failed in Windows Server 2008?

Reply
Thread Tools Display Modes

Why WNetAddConnection2 function failed in Windows Server 2008?

 
 
Zhou Xiang
Guest
Posts: n/a

 
      07-04-2008, 01:58 AM
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!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect to administrative share c$ on Windows 7 PC from Windows Server 2008 R2 boe Windows Networking 4 10-24-2009 02:31 PM
Offline files with Windows Server 2008 and Windows Vista rkorzuch Windows Networking 1 03-17-2009 07:28 PM
Windows 2008 Server - unable to copy files from server to another machine; reverse works fine Ziga Jakhel Windows Networking 0 06-16-2008 10:02 AM
Windows Server 2008 Tips - The next enterprise server version ofWindows! Russel Pitt Windows Networking 1 12-06-2007 02:58 PM
Windows Home Server or Windows Server (2008 or 2003)..? Simon Coupland Home Networking 3 11-17-2007 10:23 PM



1 2 3 4 5 6 7 8 9 10 11