Important: The information in this document is obsolete and should not be used for new development.
SysEnvirons
You can use theSysEnvirons
function when you need information about the operating environment and theGestalt
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
TheSysEnvirons
function fills in a system environment record identified by the variable parametertheWorld
. It returns a result code.You use the
versionRequested
parameter to tellSysEnvirons
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 theSysEnvirons
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 constantcurSysEnvVers
:
CONST curSysEnvVers = 2;ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for theSysEnvirons
function are
Registers on entry A0 Address of a system environment record D0 Version requested
Registers on exit A0 Address of a system environment record D0 Result code RESULT CODES
noErr 0 No error envNotPresent -5500 SysEnvirons
trap not presentenvBadVers -5501 Nonpositive version number passed envVersTooBig -5502 Requested version of SysEnvirons
not availableSEE ALSO
See "The System Environment Record" beginning on page 1-28 for a detailed description of the system environment record.