Important: The information in this document is obsolete and should not be used for new development.
SFindStruct
You can use theSFindStruct
function to obtain a pointer to any data structure pointed to by the offset field of an sResource entry. You might want to use this function, for example, when the data structure type is defined by the card designer.
FUNCTION SFindStruct (spBlkPtr: SpBlockPtr): OSErr;
- spBlkPtr
- A pointer to a Slot Manager parameter block.
<--> spsPointer
Ptr On input: a pointer to an sResource.
On output: a pointer to a data structure.--> spID
SignedByte The ID of the sResource entry. X spByteLanes
SignedByte DESCRIPTION
You provide a pointer to the sResource in thespsPointer
field, and the ID of the entry in thespID
field. TheSFindStruct
function returns a pointer to the data structure in thespResult
field.SPECIAL CONSIDERATIONS
This function may alter the value of thespByteLanes
field of the parameter block. Your application should not depend on the value returned in this field.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSFindStruct
function are
Trap macro Selector _SlotManager $0006 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 $0006
Registers on exit D0 Result code RESULT CODES
noErr 0 No error smNoMoresRsrcs -344 Requested sResource not found SEE ALSO
For information about obtaining a copy of a data structure pointed to by the offset field of an sResource entry, rather than a pointer to the data structure, see the next section, which describes theSReadStruct
function.