Important: The information in this document is obsolete and should not be used for new development.
SNextSRsrc
You can use theSNextSRsrc
function to step through the sResources on a card or from one card to the next.
FUNCTION SNextSRsrc (spBlkPtr: SpBlockPtr): OSErr;
- spBlkPtr
- A pointer to a Slot Manager parameter block.
-- spsPointer
Ptr A pointer to an sResource (described in "The sResource," beginning on page 2-7). -- spIOReserved
Integer The value of the slot resource table ioReserved
field.-- spRefNum
Integer The driver reference number. -- spCategory
Integer The Category
field of thesRsrcType
entry (described on page 2-10).-- spCType
Integer The cType
field of thesRsrcType
entry.-- spDrvrSW
Integer The DrSW
field of thesRsrcType
entry.-- spDrvrHW
Integer The DrHW
field of thesRsrcType
entry.--> spSlot
SignedByte The slot number. --> spId
SignedByte The sResource ID. --> spExtDev
SignedByte The external device identifier. -- spHWDev
SignedByte The hardware device identifier. DESCRIPTION
TheSNextSRsrc
function is similar to theSRsrcInfo
function, except theSNextSRsrc
function returns information about the sResource that follows the requested one--that is, the one with the next entry in the sResource directory or the first sResource on the next card. TheSNextSRsrc
function skips disabled sResources.You specify a particular sResource with the
spSlot
,spID
, andspExtDev
fields of the Slot Manager parameter block you point to in the spBlkPtr parameter. TheSNextSRsrc
function finds the next sResource, returns a pointer to it in thespsPointer
field, and updates thespSlot
,spID
, andspExtDev
fields to correspond to the sResource it found. If there are no more sResources, theSNextSRsrc
function returns the smNoMoresRsrcs result code.The
SNextSRsrc
function returns other information about the sResource in thespRefNum
,spCategory
,spCType
,spDrvrSW
, andspDrvrHW
fields.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSNextSRsrc
function are
Trap macro Selector _SlotManager $0014 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 $0014
Registers on exit D0 Result code RESULT CODES
noErr 0 No error smNoMoresRsrcs -344 Requested sResource not found SEE ALSO
For more control in finding sResources, you can use theSGetSRsrc
function, described on page 2-33, and theSGetTypeSRsrc
function, described on page 2-35.