Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

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


SysEnvirons

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;
versionRequested
The version number of SysEnvirons you expect.
theWorld
A system environment record.
DESCRIPTION
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:

CONST
   curSysEnvVers = 2;
ASSEMBLY-LANGUAGE INFORMATION
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

RESULT CODES
noErr0No error
envNotPresent-5500SysEnvirons trap not present
envBadVers-5501Nonpositive version number passed
envVersTooBig-5502Requested version of SysEnvirons not available
SEE ALSO
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