Important: The information in this document is obsolete and should not be used for new development.
SFindStruct
You can use theSFindStructfunction 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.
<--> spsPointerPtr On input: a pointer to an sResource.
On output: a pointer to a data structure.--> spIDSignedByte The ID of the sResource entry. X spByteLanesSignedByte DESCRIPTION
You provide a pointer to the sResource in thespsPointerfield, and the ID of the entry in thespIDfield. TheSFindStructfunction returns a pointer to the data structure in thespResultfield.SPECIAL CONSIDERATIONS
This function may alter the value of thespByteLanesfield 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 theSFindStructfunction 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
_SlotManagerreturns, 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 theSReadStructfunction.