| Previous | Next |
| ERROR_CONTROLLING_IEPORT | ERROR_CLEANER_SLOT_SET |
ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA
Dismount the cartridge before starting physical ejection
Ejection moves media through the insert/eject port, but mounted or opened media is still assigned to a drive and may be in use by an application. EjectNtmsMedia explicitly refuses media that is mounted or opened. This protects both application access and changer state; an eject request is not a substitute for releasing the drive resource.
Close application access, call DismountNtmsMedia and wait for the side to become idle and return to storage. Then queue the eject. If dismount does not finish, inspect the owning session and library request rather than forcing the port operation. For stand-alone devices, use the corresponding stand-alone eject API and understand its force semantics separately.
What to inspect
- Close handles and identify the session using the medium.
- Dismount the logical media and wait for idle state.
- Start ejection only after the cartridge is out of the drive.
References
- Microsoft: queuing and performing media ejection
- Microsoft: releasing and dismounting RSM media
- Microsoft: mounting logical media into drives
Looking for a different code? Search another status or error code.