Important: The information in this document is obsolete and should not be used for new development.
SRsrcInfo
You can use theSRsrcInfofunction to find an sResource. This function also provides additional information about the sResource, such as the driver reference number of the slot device driver.
FUNCTION SRsrcInfo (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 device 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 of the requested sResource. --> spIdSignedByte The sResource ID of the requested sResource. --> spExtDevSignedByte The external device identifier. <-- spHwDevSignedByte The hardware device identifier. DESCRIPTION
TheSRsrcInfofunction allows you to find an sResource from the slot resource table and provides additional information, including its driver reference number and the values contained in itssRsrcTypeentry.You specify an sResource with the
spSlot,spID, andspExtDevfields of the Slot Manager parameter block you point to in thespBlkPtrparameter.The
SRsrcInfofunction returns a pointer to the sResource in thespsPointerfield and returns information about the sResource type in thespRefNum,spCType,spDrvrSW,spDrvrHWfields. The function returns other information about the sResource in thespIOReserved,spRefNum, andspHwDevfields.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSRsrcInfofunction are
Trap macro Selector _SlotManager $0016 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 $0016
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 next, and theSGetTypeSRsrcfunction, described on page 2-35.