Important: The information in this document is obsolete and should not be used for new development.
SNextTypeSRsrc
You can use theSNextTypeSRsrcfunction to step through sResources of one type.
FUNCTION SNextTypeSRsrc (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). <-- spRefNumInteger The slot resource table 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.--> spTBMaskSignedByte The type bit mask for sRsrcType fields. <--> spSlotSignedByte The slot number. <--> spIdSignedByte The sResource ID. <--> spExtDevSignedByte The external device identifier. <-- spHWDevSignedByte The hardware device identifier. DESCRIPTION
TheSNextTypeSRsrcfunction allows you to find the next sResource, as does theSNextSRsrcfunction, but theSNextTypeSRsrcfunction skips disabled sResources.You indicate the sResource you want returned by identifying the slot number, sResource ID, and device ID in the
spSlot,spID, andspExtDevfields of the Slot Manager parameter block you point to in the spBlkPtr parameter. You specify the type of the sResource with thespCategory,spCType,spDrvrSW, andspDrvrHWfields. You must also use thespTBMaskto specify which of thesesRsrcTypeentry fields should not be included in the search:
The
- Set bit 0 to ignore the
DrHWfield.- Set bit 1 to ignore the
DrSWfield.- Set bit 2 to ignore the
cTypefield.- Set bit 3 to ignore the
Categoryfield.
SNextTypeSRsrcfunction returns values in thespSlot,spID, andspExtDevfields corresponding to the sResource that it found.The
SNextTypeSRsrcfunction also returns a pointer to the sResource in thespsPointerfield and returns other information about the sResource in thespIOReserved,spRefNum,spCategory,spCType,spDrvrSW, andspDrvrHWfields.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSNextTypeSRsrcfunction are
Trap macro Selector _SlotManager $0015 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 $0015
Registers on exit D0 Result code RESULT CODES
noErr 0 No error smNoMoresRsrcs -344 Requested sResource not found SEE ALSO
For information on enabling and disabling sResources, see "Enabling and Disabling sResources" on page 2-18 and the description of theSetSRsrcStatefunction on page 2-51.