PRB: WNetAddConnection2 Causes Error 1202 in Windows NT 4.0

ID: Q183986

The information in this article applies to:

SYMPTOMS

When you try to reuse an "unavailable" drive letter for a different net resource under Windows NT 4.0, 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. 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 kbNTOS400 kbSDKPlatform kbWNet kbGrpNet 
Issue type        : kbprb

Last Reviewed: July 31, 1998