Important: The information in this document is obsolete and should not be used for new development.
SNextSRsrc
You can use theSNextSRsrcfunction 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.
-- spsPointerPtr A pointer to an sResource (described in "The sResource," beginning on page 2-7). -- spIOReservedInteger The value of the slot resource table ioReservedfield.-- spRefNumInteger The driver reference number. -- spCategoryInteger The Categoryfield of thesRsrcTypeentry (described on page 2-10).-- spCTypeInteger The cTypefield of thesRsrcTypeentry.-- spDrvrSWInteger The DrSWfield of thesRsrcTypeentry.-- spDrvrHWInteger The DrHWfield of thesRsrcTypeentry.--> spSlotSignedByte The slot number. --> spIdSignedByte The sResource ID. --> spExtDevSignedByte The external device identifier. -- spHWDevSignedByte The hardware device identifier. DESCRIPTION
TheSNextSRsrcfunction is similar to theSRsrcInfofunction, except theSNextSRsrcfunction 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. TheSNextSRsrcfunction skips disabled sResources.You specify a particular sResource with the
spSlot,spID, andspExtDevfields of the Slot Manager parameter block you point to in the spBlkPtr parameter. TheSNextSRsrcfunction finds the next sResource, returns a pointer to it in thespsPointerfield, and updates thespSlot,spID, andspExtDevfields to correspond to the sResource it found. If there are no more sResources, theSNextSRsrcfunction returns the smNoMoresRsrcs result code.The
SNextSRsrcfunction returns other information about the sResource in thespRefNum,spCategory,spCType,spDrvrSW, andspDrvrHWfields.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSNextSRsrcfunction 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
_SlotManagerreturns, 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 theSGetSRsrcfunction, described on page 2-33, and theSGetTypeSRsrcfunction, described on page 2-35.