home *** CD-ROM | disk | FTP | other *** search
- /* ---------------------------------------------------------------------------------------------
- Find_icon, code for constructing icon suites for files and folders
-
- by James W. Walker
- preferred e-mail: <mailto:jwwalker@kagi.com>
- alternate e-mail: <mailto:jwwalker@aol.com>, <jim@nisus-soft.com>
- web: <http://users.aol.com/jwwalker/>
-
- File: Is_vol_ejected.c
-
- Copyright ©1997 by James W. Walker
-
- You may incorporate this sample code into your applications without
- restriction, though the sample code has been provided "AS IS" and the
- responsibility for its operation is 100% yours.
- If you're going to re-distribute the source, please make it clear
- that the code was descended from James W. Walker's code,
- but that you've made changes.
- ---------------------------------------------------------------------------------------------
- */
-
- #include <Files.h>
- #include "Is_vol_ejected.h"
-
- Boolean Is_vol_ejected( short vRefNum )
- {
- OSErr err;
- HVolumeParam vol_pb;
-
- vol_pb.ioNamePtr = NULL;
- vol_pb.ioVRefNum = vRefNum;
- vol_pb.ioVolIndex = 0;
- err = PBHGetVInfoSync( (HParmBlkPtr) &vol_pb );
-
- return (err == noErr) && (vol_pb.ioVDRefNum > 0);
- }
-