| Previous | Next |
| ERROR_CONNECTION_UNAVAIL | ERROR_NO_NET_OR_BAD_PATH |
ERROR_DEVICE_ALREADY_REMEMBERED
WNetAddConnection2 explicitly associates this error with persistent connection profile data. If lpLocalName already has a remembered entry that points somewhere else, attempting to create a new persistent mapping for that local device can fail even when there is no active connection visible at the moment.
The important comparison is active connection state versus profile state. ERROR_ALREADY_ASSIGNED reports an existing network connection for the local device; ERROR_DEVICE_ALREADY_REMEMBERED reports a remembered profile entry for another target.
Profile-collision checks
- Read the remembered connection for the affected local device in the same user context.
- Compare the remembered remote name with the new lpRemoteName.
- Remove or update the persistent mapping deliberately rather than only disconnecting a transient session.
- Retest after logon restoration if the mapping is created by policy or a profile script.
WNetAddConnection2 · Samba standalone server and guest shares
Looking for a different code? Search another status or error code.