| Previous | Next |
| ERROR_DISK_CHANGE | ERROR_BROKEN_PIPE |
ERROR_DRIVE_LOCKED
What ERROR_DRIVE_LOCKED means
ERROR_DRIVE_LOCKED is a Win32 system result whose documented message is: “The disk is in use or locked by another process.” In practical troubleshooting, it belongs to volume, removable-drive, formatting, backup, or maintenance operations that need exclusive drive access but another process owns or uses it.
Typical causes
- an open file or current directory keeps the volume busy
- antivirus, indexing, backup, or shell software opened the drive during an exclusive operation
- another maintenance tool already holds a volume lock
How to investigate the result
- Use handle enumeration to locate processes with open objects on the volume
- Check services that scan newly mounted media
- retry after closing shells and changing all current directories away from the drive
Developer guidance
Acquire exclusive access only for the shortest necessary interval and report the blocking volume and operation. Do not forcibly invalidate unrelated handles.
Administrator and support guidance
Close applications using the drive and pause scanners only when operational policy allows it. For system volumes, schedule the operation for boot or offline maintenance.
Example
A formatting tool requests an exclusive lock while Explorer is previewing a file on the removable drive, so the lock attempt returns this result.
How it differs from related results
ERROR_BUSY_DRIVE is associated with legacy JOIN or SUBST manipulation; it usually reflects a real drive or volume being held by another process.
References
Looking for a different code? Search another status or error code.