Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User friendly machine name (gestaltUserVisibleMachineName?)



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.

-eric
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >User friendly machine name (gestaltUserVisibleMachineName?) (From: Rolf <email@hidden>)



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.