home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13246 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.7 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!uakari.primate.wisc.edu!ames!claris!outpost.SF-Bay.org!peirce
  2. From: peirce@outpost.SF-Bay.org (Michael Peirce)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: ATrap to Determe my Mac name?
  5. Message-ID: <D2150035.9s44gf@outpost.SF-Bay.org>
  6. Date: 31 Jul 92 05:33:05 GMT
  7. Reply-To: peirce@outpost.SF-Bay.org (Michael Peirce)
  8. Organization: Peirce Software
  9. Lines: 30
  10. X-Mailer: uAccess - Macintosh Release: 1.5v4
  11.  
  12.  
  13. In article <45905@shamash.cdc.com> (comp.sys.mac.programmer), ldh@svl.cdc.com (Lawrence D. Hare) writes:
  14. > Well - I give up. Assuming that the name my Mac has (System 6 & 7) is the
  15. > same
  16. > as in a Unix /etc/hosts file, which it jolly well better be, I need to
  17. > figure out
  18. > what the name of the Mac I am running on is.
  19. > I have looked, and looked, and looked.... Surely there is a dead simple
  20. > call!
  21. > Anyone know what it is and where it is documented?
  22.  
  23. This comes up ever month or so, but here it is again...
  24.  
  25. Under System 7 there are two name for a Mac.  The User Name (Choose
  26. name under pre-System 7) is found in the STR resource with ID = -16096
  27. in the System File.  The Machine name is found in the STR resource with
  28. ID = -16416.
  29.  
  30. You can fetch either of these by calling GetString() since the System
  31. File is open in your application.
  32.  
  33. I don't know how these names relate to the name found in a Unix system
  34. - I don't do Unix :-)
  35.  
  36. --  Michael Peirce      --   peirce@outpost.SF-Bay.org
  37. --  Peirce Software     --   Suite 301, 719 Hibiscus Place
  38. --                      --   San Jose, California USA 95117
  39. --  Makers of...        --   voice: (408) 244-6554 fax: (408) 244-6882
  40. --            SMOOTHIE  --   AppleLink: peirce & America Online: AFC Peirce
  41.