What does Windows error code 1440 (ERROR_SCREEN_ALREADY_LOCKED) mean?

 
Previous Next
ERROR_INVALID_SPI_VALUE ERROR_HWNDS_HAVE_DIFF_PARENT

ERROR_SCREEN_ALREADY_LOCKED

The interactive session is already locked.

ERROR_SCREEN_ALREADY_LOCKED is Win32 error 1440 (0x5A0). A component requested a screen or session lock when the target session was already in the locked state. Depending on the caller’s contract, this can be an idempotent outcome rather than a condition requiring user intervention.

Where duplicate lock requests arise

  • both inactivity policy and an application request lock at the same time
  • a remote-management service repeats a command after losing its acknowledgment
  • session-change notification and local UI logic each initiate locking
  • a scheduled security action races with manual Win+L
  • code targets the wrong session and finds that session already locked

Evidence to preserve

Record the target session ID, user SID, request source, lock trigger, timestamp, previous session state, remote or local context, and correlation ID. Avoid logging credentials or desktop contents. For retrying protocols, include the original command identifier so duplicates can be distinguished from separate legitimate requests.

Diagnostic sequence

Confirm which interactive session the operation targeted and query its state through supported session-management interfaces. Trace all lock initiators and determine whether the application needs exactly-once behavior or simply “ensure locked” semantics. Check whether a remote command timed out after the lock succeeded but before its response arrived.

Do not attempt to unlock automatically in order to repeat the lock operation. Unlocking requires user authentication and changes the security boundary. If downstream work depends on receiving a lock transition event, handle the existing locked state explicitly instead of forcing another transition.

Correct application behavior

For an “ensure this session is locked” command, treat error 1440 as the desired final state and report that the session was already secure. For workflows that must audit a new transition, return a distinct “no transition occurred” result. Deduplicate remote requests by operation ID and make session selection explicit.

Difference from lock failure

A generic access or session error means the caller could not establish the requested state. Error 1440 says the state already exists. It should not be displayed as though the screen remained unlocked, but it may still reveal duplicated commands or incorrect session routing.

Example

A management console sends a lock command and loses the network response. It retries with the same operation ID after the first command has locked the workstation. The agent receives 1440, recognizes that the target state is already satisfied, and reports success without unlocking or generating a false alarm.

References


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