| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Friday, May 30, 2003, at 12:16 PM, Rolf wrote:
I'm trying to write a method to determine the user friendly machine name (For example "PowerBook G4") in a Cocoa app.
Are you referring to the machine name that's set in the Sharing preference pane? If so, try CSCopyMachineName in CarbonCore/OSUtils.h.
As far as I know the Carbon Gestalt Manager has to be used, and the gestaltUserVisibleMachineName looks like the correct selector. I wrote the attached code but it doesn't work. Gestalt() succeeds and it returns a seemingly correct value. However GetIndString makes sMachineName into an empty string. Does anybody know why ?
I believe that 'STR#' resource is only supported on Mac OS 9, not X.
| References: | |
| >Re: User friendly machine name (gestaltUserVisibleMachineName?) (From: Eric Schlegel <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.