PDA

View Full Version : Unit is locked error message when unmounting



Andareed
12.01.2003, 22:15
You can usually fix this issue by disabling all virtual drives (i.e., set number of virtual drives to 0) and then re-enabling them. In general, this issue is caused by some application locking the drive and "forgetting" to unlock it.

This can also be the result of cdrom.inf / cdrom.pnf missing from C:\windows\inf.

To fix this you must first find these files:
[1]Search for cdrom.* on your windows cd.
[2]Ifyou find cdrom.inf or cdrom.pnf, copy these files to C:\windows\inf folder, and proceed to 'Reinstalling Driver' section below.
[3]If you find cdrom.in_/cdrom.pn_, open these files with winrar/winzip.
[4]Extract the single file to C:\windows\inf

How to reinstall driver:
[1]Start device manager; If you have win9x, right-click my computer, goto properties, then device manager; for winnt, run devmgmt.msc.
[2]Goto DVD/CDROM drives, and right-click the stealth drive, and goto properties.
[3]Look for reinstall driver button, and click it.

LIGHTNING UK!
16.05.2003, 12:29
I actually found this problem to be caused by the virtual device's tray being locked. Perhaps DT should issue an 'Unlock Tray' command before unmounting?

Development
16.05.2003, 12:59
Many applications can issue 'lock media' requests - driver keeps internal lock count. Each application properly written should ussue unlock request.
Only then it will be possible to eject or unmount media. Lock counter is ignored only when device is completely removed from system (like when you turn off power of your USB CDROM). During normal operation though it should obey lock count - otherwise it will mislead all applications that expect that media is still present in drive.

LIGHTNING UK!
16.05.2003, 16:17
Ok, that's cool. I only mentioned it because a few people have mentioned it to me on IRC and so I looked into it. I know my program locks the drive, but it also always unlocks it and yet they say that they still get the 'unit locked' message.
I'd just hope that if people were unmounting an image, they would know its not being used - or at least not by them!

Development
16.05.2003, 19:21
Ok. And please report any anomal cases if you think it could be Daemon problem.