home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20340 < prev    next >
Encoding:
Text File  |  1992-12-27  |  1.2 KB  |  34 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!think.com!yale.edu!spool.mu.edu!umn.edu!umeecs!nuntius
  3. From: The Mad Hacker <Mad@HackersRus>
  4. Subject: Re: Telling the volume type
  5. Message-ID: <1992Dec27.224133.14830@zip.eecs.umich.edu>
  6. Sender: news@zip.eecs.umich.edu (Mr. News)
  7. Organization: The Society for the Advancement of Hacking
  8. X-Useragent: Nuntius v1.1
  9. References: <1992Dec24.150941.25299@infodev.cam.ac.uk>
  10. Date: Sun, 27 Dec 1992 22:41:33 GMT
  11. Lines: 21
  12.  
  13. To get more info on a volume, use the PBHGetVInfo function. You can use
  14. the
  15.    ioVDRefNum field to get the driver id for the device. Compare: the AFS
  16. driver
  17.    is always -42, SCSI devices are within a certain ranges, and floppies
  18. (the
  19.    .Sony driver) is constant also. Do a switch on the driver RefNum, and
  20. you should
  21.    be set.
  22. More daring, however, is to use the slightly documented feature from IM
  23. IV (the
  24.    Disk Driver chapter), to get the physical drive icon from the driver
  25. itself.
  26.    Although it says it only works for the HD20, I believe most if not all
  27. drivers
  28.    accept the control param. (I have used the first, but not the second
  29. method, and
  30.    it seems to work).
  31.  
  32. fprefect@engin.umich.edu
  33. Matt Slot, CAEN Mac-Systems
  34.