SUpdateSRTFor system software versions earlier than System 7, you can use the
SUpdateSRTfunction 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;
- A pointer to a Slot Manager parameter block.
Integer The value to be stored in the
IOReservedfield of the slot resource table.
Integer The device driver reference number. -->
SignedByte The slot number. -->
SignedByte The sResource ID. -->
SignedByte The external device identifier.
SUpdateSRTfunction adds or updates an record in the slot resource table. You specify an sResource with the
spExtDevfields of the Slot Manager parameter block you point to in the spBlkPtr parameter. If a matching record is found in the slot resource table, the
IOReservedfields 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 CONSIDERATIONSIn System 7, this function was replaced by the
InsertSRTRecfunction (described on page 2-54). You should use the
SUpdateSRTfunction only if version 1 or later of the Slot Manager is not available. You can use the
SVersionfunction, described on page 2-30, to determine whether the Slot Manager is version 1 or later.
ASSEMBLY-LANGUAGE INFORMATIONThe trap macro and routine selector for the
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
noErr 0 No error memFullErr -108 Not enough room in heap
-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 ALSOFor 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 the
SDeleteSRTRecfunction, described on page 2-52.