Important: The information in this document is obsolete and should not be used for new development.
SReadWord
You can use theSReadWordfunction to determine the value of the low-order word of an sResource entry.
FUNCTION SReadWord (spBlkPtr: SpBlockPtr): OSErr;
- spBlkPtr
- A pointer to a Slot Manager parameter block.
<-- spResultLongInt The contents of the entry word. --> spsPointerPtr A pointer to an sResource (described in "The sResource," beginning on page 2-7). --> spIDSignedByte The ID of the sResource entry. X spOffsetDataLongInt X spByteLanesSignedByte DESCRIPTION
TheSReadWordfunction returns the low-order word of the offset field of an entry in an sResource. You provide a pointer to the sResource in thespsPointerfield of the Slot Manager parameter block you point to in the spBlkPtr parameter, and you provide the ID of the entry in thespIDfield. TheSReadWordfunction returns the value in the low-order word of thespResultfield.SPECIAL CONSIDERATIONS
This function may alter the values of thespOffsetDataandspByteLanesfields of the parameter block. Your application should not depend on the values returned in these fields.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSReadWordfunction are
Trap macro Selector _SlotManager $0001 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 $0001
Registers on exit D0 Result code RESULT CODES
noErr 0 No error smNoMoresRsrcs -344 Requested sResource not found