Important: The information in this document is obsolete and should not be used for new development.
SRsrcInfo
You can use theSRsrcInfo
function 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.
<-- 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 device 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 of the requested sResource. --> spId
SignedByte The sResource ID of the requested sResource. --> spExtDev
SignedByte The external device identifier. <-- spHwDev
SignedByte The hardware device identifier. DESCRIPTION
TheSRsrcInfo
function 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 itssRsrcType
entry.You specify an sResource with the
spSlot
,spID
, andspExtDev
fields of the Slot Manager parameter block you point to in thespBlkPtr
parameter.The
SRsrcInfo
function returns a pointer to the sResource in thespsPointer
field and returns information about the sResource type in thespRefNum
,spCType
,spDrvrSW
,spDrvrHW
fields. The function returns other information about the sResource in thespIOReserved
,spRefNum
, andspHwDev
fields.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSRsrcInfo
function 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
_SlotManager
returns, 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 theSGetSRsrc
function, described next, and theSGetTypeSRsrc
function, described on page 2-35.