PATHADC Home > Documentation > Hardware > Power Mac G4 Developer Note
Up Previous Next 

Computer Identification

Rather than reading the box flag or the model string and then making assumptions about the computer's features, applications that need to find out the features of the machine should use Gestalt calls to test for the features they require.

Asset management software that reports the kind of machine it is run on can obtain the value of the property at Devices:device-tree:compatible in the name registry. The model string is the first program-usable string in the array of C strings in the compatible field. For the Power Mac G4, the value of the model property is PowerMac3,3 .

The string obtained from the compatible property cannot be displayed to the computer user. A better method, if it is available, is to use the result from calling Gestalt ('mnam', &result) where result is a string pointer. This call returns a Pascal-style string that can be displayed to the user.


© 2000 Apple Computer, Inc. – (Last Updated 03 Aug 00)

Up Previous Next