Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!mit-eddie!uw-beaver!Teknowledge.COM!unix!mxmora From: mxmora@unix.SRI.COM (Matt Mora) Newsgroups: comp.sys.mac.programmer Subject: Volume Questions Message-ID: <17533@unix.SRI.COM> Date: 23 Oct 90 23:18:57 GMT Reply-To: mxmora@sri-unix.sri.com (Matt Mora) Organization: SRI International, Menlo Park, CA Lines: 41 Keywords:Drive,Volumes,Devices I have a few questions about getting information from mounted volumes. 1. How do you tell if the media is removable? I know this has been hashed over before but I could only find some C code from Brian Bechel (sp?). Does anybody have code to do this in Pascal? 2. This is related to question 1, what is the difference between PBUnmountVol(pb) and PBEject(pb)? Can I just call PBUnmountVol and will it eject a floppy? What about the reverse, am I wrong to assume that eject will also unmount a volume? 3. I can't seem to find some sample code that shows how to get the icon from a volume. Does anybody have some code to share? What I'm doing: I have a dialog box that the user can select a volume. It has four buttons named, Select,Cancel,Eject,Drive. It also displays the name of the current volume in a static text field. I would also like to display the current volume's icon. Should the button named "eject" change its name when the next volume selected is not ejectable to unmout or should it just be dimmed? Thanks for any insight you can provide. P.S. IM talks about get the drive's icon by doing a PBcontrol call. I tried that but THINK Pascal won't let me coerse the return value in to a handle. Boy, I really should learn C :-) -- ___________________________________________________________ Matthew Mora | my Mac Matt_Mora@sri.com SRI International | my unix mxmora@unix.sri.com ___________________________________________________________