Important: The information in this document is obsolete and should not be used for new development.
SUpdateSRT
For system software versions earlier than System 7, you can use theSUpdateSRTfunction to update the slot resource table record for an existing sResource. A new record will be added if the sResource does not already exist in the slot resource table.
FUNCTION SUpdateSRT (spBlkPtr: SpBlockPtr): OSErr;
- spBlkPtr
- A pointer to a Slot Manager parameter block.
--> spIOReservedInteger The value to be stored in the IOReservedfield of the slot resource table.--> spRefNumInteger The device driver reference number. --> spSlotSignedByte The slot number. --> spIdSignedByte The sResource ID. --> spExtDevSignedByte The external device identifier. DESCRIPTION
TheSUpdateSRTfunction adds or updates an record in the slot resource table. You specify an sResource with thespSlot,spID, andspExtDevfields of the Slot Manager parameter block you point to in the spBlkPtr parameter. If a matching record is found in the slot resource table, theRefNumandIOReservedfields of the table are updated. If the record is not found, the sResource is added to the table by reading the appropriate declaration ROM. Updates may be made to enabled sResources only.SPECIAL CONSIDERATIONS
In System 7, this function was replaced by theInsertSRTRecfunction (described on page 2-54). You should use theSUpdateSRTfunction only if version 1 or later of the Slot Manager is not available. You can use theSVersionfunction, described on page 2-30, to determine whether the Slot Manager is version 1 or later.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSUpdateSRTfunction are
Trap macro Selector _SlotManager $002B You must set up register D0 with the routine selector and register A0 with the address of the Slot Manager parameter block. When
_SlotManagerreturns, register D0 contains the result code.
Registers on entry A0 Address of the parameter block D0 $002B
Registers on exit D0 Result code RESULT CODES
noErr 0 No error memFullErr -108 Not enough room in heap smEmptySlot-300 No card in this slot smUnExBusErr -308 Bus error smBadRefId -330 Reference ID not found in list smSlotOOBErr -337 Slot number out of bounds smNoMoresRsrcs -344 Specified sResource not found SEE ALSO
For more information about the slot resource table, see "About the Slot Manager" on page 2-15.For information about the preferred routine for adding an sResource to the slot resource table, see the
InsertSRTRecfunction, described on page 2-54. For information about deleting an sResource from the slot resource table, see theSDeleteSRTRecfunction, described on page 2-52.