What does Windows error code 1200 (ERROR_BAD_DEVICE) mean?

 
Previous Next
ERROR_SHUTDOWN_USERS_LOGGED_ON ERROR_CONNECTION_UNAVAIL

ERROR_BAD_DEVICE

WNetAddConnection2 documents this result when NETRESOURCE.lpLocalName names a device that is not redirectable. The local name is part of the connection contract: drive-letter redirection and printer-device redirection use defined device forms, while a deviceless connection is represented by a NULL or empty lpLocalName.

This is input validation at the local redirection layer. It can fail before the remote provider meaningfully attempts to connect, so checking server availability or SMB credentials first is usually wasted effort.

Validate the local device field

  • Log lpLocalName exactly as passed to the WNet function.
  • Use a valid drive or printer local-device form when redirection is required.
  • Use a deviceless connection when no local device association is needed.
  • Compare with ERROR_ALREADY_ASSIGNED, which means a valid local device is already occupied.

WNetAddConnection2 · Windows network redirector architecture


Looking for a different code? Search another status or error code.