Select the product you need help with
BUG: WNetUseConnection Returns ERROR_ALREADY_ASSIGNED on Windows 2000Article ID: 257298 - View products that this article applies to. This article was previously published under Q257298 On This PageSYMPTOMS
On Windows 2000, a call to WNetUseConnection() with the lpLocalName member of NETRESOURCE structure set to "NULL" and dwFlags set to "CONNECT_REDIRECT" returns error 85, "ERROR_ALREADY_ASSIGNED". This also affects ShellExecuteEx() when used with the SEE_MASK_CONNECTNETDRV flag.
CAUSE
The function is failing to choose the correct local device for redirection.
RESOLUTIONTo resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the
Microsoft Knowledge Base:
260910
(http://support.microsoft.com/kb/260910/EN-US/
)
How to Obtain the Latest Windows 2000 Service Pack
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Windows 2000 Service Pack 1. MORE INFORMATION
According to the WNetUseConnection() documentation on the MSDN, if the CONNECT_REDIRECT value is set in the dwFlags parameter, and if lpLocalName is "NULL", the function should choose a local device to redirect and should return the name of the device in the lpAccessName parameter. But on Windows 2000, WNetUseConnection() fails with the error, "ERROR_ALREADY_ASSIGNED". Steps to Reproduce BehaviorUse the following code snippet to reproduce the problem:Properties |


Back to the top








