davids@caen.engin.umich.edu (David Snearline) (06/06/90)
This morning I decided to test out the "software volume lock" that is documented under PBSetVInfo in Inside Mac IV. I wrote a quick program that would do a _GetVInfo, modify bit 15 of the ioVAtrb, and then called _SetVInfo. Sure enough, this locked the volume quite well. I then ran the same program, but had it clear bit 15 instead of setting it. OSErr ID=-46 -- Volume is locked by software flag. It seems that you cannot unlock a volume with _SetVInfo once you lock it with _SetVInfo. I managed to unlock my volume by modifying the volume information block at the disk driver level (via MacTools). However, I would like to know what is considered the "official" method of locking and unlocking hard drives. Inside Mac IV is full of warnings not use the disk driver to modify low level structures if at all possible. Is there a better way to do this? Or is are direct disk driver calls still the way to do this? David Snearline Computer Aided Engineering Network davids@mondo.engin.umich.edu University of Michigan Engineering