SysEnvironsYou can use the
SysEnvironsfunction when you need information about the operating environment and the
Gestaltfunction is not available.
FUNCTION SysEnvirons (versionRequested: Integer; VAR theWorld: SysEnvRec): OSErr;
- The version number of
- A system environment record.
SysEnvironsfunction fills in a system environment record identified by the variable parameter
theWorld. It returns a result code.
You use the
versionRequestedparameter to tell
SysEnvironswhich 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
SysEnvironsversion 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
CONST curSysEnvVers = 2;
ASSEMBLY-LANGUAGE INFORMATIONThe registers on entry and exit for the
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
noErr 0 No error envNotPresent -5500
SysEnvironstrap not present
envBadVers -5501 Nonpositive version number passed envVersTooBig -5502 Requested version of
SEE ALSOSee "The System Environment Record" beginning on page 1-28 for a detailed description of the system environment record.