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