Important: The information in this document is obsolete and should not be used for new development.
WriteParam
You can use theWriteParamfunction to write the modified values in the system parameters record to parameter RAM.
FUNCTION WriteParam: OSErr;DESCRIPTION
TheWriteParamfunction writes the modified values in the system parameters record to parameter RAM. Your application should call this function only after making changes to the system parameters record (returned by theGetSysPPtrfunction described in the previous section).The
WriteParamfunction also attempts to verify the values written by reading them back in and comparing them to the values in the low-memory copy.SPECIAL CONSIDERATIONS
Because the organization of parameter RAM is subject to change, you should not use theWriteParamfunction to change the values in parameter RAM. Instead use the appropriate Toolbox routines to modify values in parameter RAM.
- Note
- If you accidentally use
WriteParamto write incorrect values into parameter RAM, the user can clear the current settings in the parameter RAM and restore the default values by holding down the x-Option-P-R keys at system startup.![]()
ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for theWriteParamfunctions are
Registers on entry A0 SysParam D0 MinusOne
Registers on exit D0 Result code For historical reasons, you must set up register A0 with the global variable
SysParamand register D0 with the global variableMinusOne. WhenWriteParamreturns, register D0 contains the result code.RESULT CODES
noErr 0 No error prWrErr -87 Parameter RAM written did not verify SEE ALSO
For a description of the system parameters record, see page 7-31.