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 theSUpdateSRT
function 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.
--> spIOReserved
Integer The value to be stored in the IOReserved
field of the slot resource table.--> spRefNum
Integer The device driver reference number. --> spSlot
SignedByte The slot number. --> spId
SignedByte The sResource ID. --> spExtDev
SignedByte The external device identifier. DESCRIPTION
TheSUpdateSRT
function adds or updates an record in the slot resource table. You specify an sResource with thespSlot
,spID
, andspExtDev
fields of the Slot Manager parameter block you point to in the spBlkPtr parameter. If a matching record is found in the slot resource table, theRefNum
andIOReserved
fields 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 theInsertSRTRec
function (described on page 2-54). You should use theSUpdateSRT
function only if version 1 or later of the Slot Manager is not available. You can use theSVersion
function, 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 theSUpdateSRT
function 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
_SlotManager
returns, 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
InsertSRTRec
function, described on page 2-54. For information about deleting an sResource from the slot resource table, see theSDeleteSRTRec
function, described on page 2-52.