Important: The information in this document is obsolete and should not be used for new development.
SNextTypeSRsrc
You can use theSNextTypeSRsrc
function to step through sResources of one type.
FUNCTION SNextTypeSRsrc (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). <-- spRefNum
Integer The slot resource table 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.--> spTBMask
SignedByte The type bit mask for sRsrcType fields. <--> spSlot
SignedByte The slot number. <--> spId
SignedByte The sResource ID. <--> spExtDev
SignedByte The external device identifier. <-- spHWDev
SignedByte The hardware device identifier. DESCRIPTION
TheSNextTypeSRsrc
function allows you to find the next sResource, as does theSNextSRsrc
function, but theSNextTypeSRsrc
function skips disabled sResources.You indicate the sResource you want returned by identifying the slot number, sResource ID, and device ID in the
spSlot
,spID
, andspExtDev
fields of the Slot Manager parameter block you point to in the spBlkPtr parameter. You specify the type of the sResource with thespCategory
,spCType
,spDrvrSW
, andspDrvrHW
fields. You must also use thespTBMask
to specify which of thesesRsrcType
entry fields should not be included in the search:
The
- Set bit 0 to ignore the
DrHW
field.- Set bit 1 to ignore the
DrSW
field.- Set bit 2 to ignore the
cType
field.- Set bit 3 to ignore the
Category
field.
SNextTypeSRsrc
function returns values in thespSlot
,spID
, andspExtDev
fields corresponding to the sResource that it found.The
SNextTypeSRsrc
function also returns a pointer to the sResource in thespsPointer
field and returns other information about the sResource in thespIOReserved
,spRefNum
,spCategory
,spCType
,spDrvrSW
, andspDrvrHW
fields.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSNextTypeSRsrc
function 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
_SlotManager
returns, 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 theSetSRsrcState
function on page 2-51.