Path: utzoo!utgpu!attcan!uunet!ccicpg!puivax!dave From: dave@puivax.UUCP (Dave Duffy) Newsgroups: comp.sys.mac.programmer Subject: Re: Hard Disk Icons Keywords: Disk, Icon Message-ID: <301@puivax.UUCP> Date: 16 Jan 89 17:46:23 GMT References: <300@puivax.UUCP> <6112@polya.Stanford.EDU> Reply-To: dave@puivax.UUCP (Dave Duffy) Organization: Philips Ultrasound International, Santa Ana, CA. Lines: 46 In article <6112@polya.Stanford.EDU> kaufman@polya.Stanford.EDU (Marc T. Kaufman) writes: >In article <300@puivax.UUCP> dave@puivax.UUCP (Dave Duffy) writes: >.Hello out there. I am in the process of attempting to write a disk >.cataloging utility (yes, another one). 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. > >The csCode = 21 call works for me. Note that this is a CONTROL call, even >though you are logically asking for information to be returned (which >intuition would suggest should be a STATUS call). Remember to put the DRIVE >number in the appropriate field. > >Marc Kaufman (kaufman@polya.stanford.edu) OK, let's get more specific. (I was trying to avoid looking too stupid here). I was using a CONTROL call, but I must admit I found the description a tad confusing. It says to use csCode = 21. That part is fine. However, it also say csParam should be (I think it says) ptr (long). What does that mean. csParam is an array of ints. I suppose I can use HiWord and LoWord to break it up, but what is supposed to go there? Or is that supposed to be where the driver returns the icon pointer? If not there, where is the icon pointer returned? I attempted to put a pointer in there using HiWord and LoWord, but the contents of the "pointed-to" area wasn't changed upon return from the Control call. However, the returned result was = 0. As I said in my original request, I think I need fairly specific instructions. Something along the following lines would be nice: 1. Turn on the Macintosh. 2. Put fingers on the keyboard. . . . . . Dave