Path: utzoo!attcan!uunet!lll-winken!ames!pasteur!ucbvax!bloom-beacon!think!ephraim From: ephraim@think.COM (Ephraim Vishniac) Newsgroups: comp.sys.mac.programmer Subject: Re: Hard Disk Icons Keywords: Disk, Icon Message-ID: <35424@think.UUCP> Date: 16 Jan 89 15:08:09 GMT References: <300@puivax.UUCP> Sender: news@think.UUCP Reply-To: ephraim@think.com (Ephraim Vishniac) Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 27 In article <300@puivax.UUCP> dave@puivax.UUCP (Dave Duffy) writes: >I would like to be able to display the icons of any hard disks >present on the system, and I just can't figure out how to get the >icon. I know it is somewhere in the driver, but since the finder is >able to display the icon, there must be some method of asking the >driver for the icon. I tried using the Control call documented in >IM-4, but had no success. I know it is described as for the HD-20 >only, but I figured it couldn't hurt. It is also possible I wasn't >setting up the parameter block properly. When writing a driver, I followed the description given in Tech Note #28: Finders and Foreign Drives. "Finders 4.1 and newer issue a new Control call and, if that fails, they issue the old Control call. The new call has csCode = 21, and the driver should return a pointer in csParam. The pointer points to an 'ICN#' followed by a 1 to 31 byte Pascal string containing the descriptor." Notes: the csCode is 21 decimal. The ICN# is the actual icon image and mask, not a resource number. The pointer is a pointer, not a handle. The Pascal string is an Str31 located immediately after the ICN# (i.e., at the end of the icon mask). Ephraim Vishniac ephraim@think.com Thinking Machines Corporation / 245 First Street / Cambridge, MA 02142-1214 "Arlo Guthrie, it seems, has found what he was looking for: God, and the Macintosh." (Boston Globe)