Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!stevec From: stevec@Apple.COM (Steve Christensen) Newsgroups: comp.sys.mac.programmer Subject: Re: raw read/write floppies Message-ID: <50499@apple.Apple.COM> Date: 20 Mar 91 02:22:09 GMT References: <69144@brunix.UUCP> Organization: Apple Computer Inc., Cupertino, CA Lines: 19 In article <69144@brunix.UUCP> reb@cs.brown.edu (Robert E. Brown) writes: >I would like to run a program that asks the user to insert a floppy, and after >one has been inserted, reads and writes to the disk. I have written code >that can read from a floppy disk, but inserting a floppy normally couses the >Mac to mount the disk. How can I turn off the auto-mounting? Once my program >has finished reading and writing the disk, how do I eject it? At this >point, the disk is not mounted. Will PBeject work anyway? After you put up a dialog to prompt the user to insert a disk, try calling GetOSEvent() instead of GetNextEvent(). GetNextEvent actually calls GetOSEvent and then calls MountVol() to try to mount the disk. After you're done you can call PBEject() to eject the disk... steve -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Steve Christensen Never hit a man with glasses. stevec@apple.com Hit him with a baseball bat.