Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
BUG: WNetUseConnection Returns ERROR_ALREADY_ASSIGNED on Windows 2000
Article ID: 257298 - View products that this article applies to.
This article was previously published under Q257298
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.
The function is failing to choose the correct local device for redirection.
To 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:
(http://support.microsoft.com/kb/260910/EN-US/ )How to Obtain the Latest Windows 2000 Service Pack
Microsoft 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.
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:
Article ID: 257298 - Last Review: February 22, 2007 - Revision: 3.2