Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 1 - Gestalt Manager / Gestalt Manager Reference
Gestalt Manager Routines / Getting Information About the Operating Environment


You can use the SysEnvirons function when you need information about the operating environment and the Gestalt function is not available.

FUNCTION SysEnvirons (versionRequested: Integer; 
                      VAR theWorld: SysEnvRec): OSErr;
The version number of SysEnvirons you expect.
A system environment record.
The SysEnvirons function fills in a system environment record identified by the variable parameter theWorld. It returns a result code.

You use the versionRequested parameter to tell SysEnvirons which version of the system environment record you're prepared to receive. This chapter documents version 2, which contains the same fields as version 1 but recognizes a more complete set of descriptive constants. Apple will raise the SysEnvirons version number in the future only if the record structure changes. You can trust any future revision to return the version 2 record if you request it, although the record might contain whatever constants are then current. To request the most recent version, you can use the constant curSysEnvVers:

   curSysEnvVers = 2;
The registers on entry and exit for the SysEnvirons function are
Registers on entry
A0Address of a system environment record
D0Version requested
Registers on exit
A0Address of a system environment record
D0Result code

noErr0No error
envNotPresent-5500SysEnvirons trap not present
envBadVers-5501Nonpositive version number passed
envVersTooBig-5502Requested version of SysEnvirons not available
See "The System Environment Record" beginning on page 1-28 for a detailed description of the system environment record.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice