Microsoft KB Archive/183986

{|
 * width="100%"|

PRB: WNetAddConnection2 Causes Error 1202 in Windows NT 4.0 and Windows 2000

 * }

Q183986

-

The information in this article applies to:


 * Microsoft Windows NT Server version 4.0
 * Microsoft Windows NT Workstation version 4.0
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Professional

-

SYMPTOMS
When you try to reuse an "unavailable" drive letter for a different net resource under Windows NT 4.0 or Windows 2000, error 1202: ERROR_DEVICE_ALREADY_REMEMBERED appears.

CAUSE
A persistent connection becomes "unavailable" when it is disconnected using WNetCancelConnection2 without updating the stored information about it. Although the system allows WNetAddConnection2 to reuse an "unavailable" drive letter for a different net resource under Windows NT 3.51, such attempts are not permitted under Windows NT 4.0 and Windows 2000. This behavioral change is mainly due to concerns that the "unavailable" connection might have to be restored later by its dependent processes.

The change forces you to either use a separate drive letter for the second net resource, or explicitly make the "unavailable" drive available for the second net resource. The latter approach deletes the information about the previous connection that is stored in the registry.

STATUS
This behavior is by design.

Additional query words:

Keywords : kbnetwork kbAPI kbOSWinNT400 kbOSWin2000 kbSDKPlatform kbWNet kbGrpDSNet

Issue type : kbprb

Technology : kbWinNTsearch kbWinNTWsearch kbWinNTW400 kbWinNTW400search kbWinNT400xsearch kbwin2000AdvServ kbwin2000AdvServSearch kbwin2000Serv kbWinNTSsearch kbWinNTS400xsearch kbWinNTS400 kbwin2000ServSearch kbwin2000Search kbwin2000ProSearch kbwin2000Pro kbWinAdvServSearch