Important: The information in this document is obsolete and should not be used for new development.
SysEnvirons
You can use theSysEnvironsfunction when you need information about the operating environment and theGestaltfunction is not available.
FUNCTION SysEnvirons (versionRequested: Integer; VAR theWorld: SysEnvRec): OSErr;
versionRequested- The version number of
SysEnvironsyou expect.theWorld- A system environment record.
DESCRIPTION
TheSysEnvironsfunction fills in a system environment record identified by the variable parametertheWorld. It returns a result code.You use the
versionRequestedparameter to tellSysEnvironswhich 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 theSysEnvironsversion 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 theSysEnvironsfunction 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 SysEnvironstrap not presentenvBadVers -5501 Nonpositive version number passed envVersTooBig -5502 Requested version of SysEnvironsnot availableSEE ALSO
See "The System Environment Record" beginning on page 1-28 for a detailed description of the system environment record.