Important: The information in this document is obsolete and should not be used for new development.
SReadLong
You can use theSReadLong
function to determine the value of a long word pointed to by the offset field of an sResource entry.
FUNCTION SReadLong (spBlkPtr: SpBlockPtr): OSErr;
- spBlkPtr
- A pointer to a Slot Manager parameter block.
<-- spResult
LongInt The contents of the long word. --> spsPointer
Ptr A pointer to an sResource (described in "The sResource," beginning on page 2-7). --> spID
SignedByte The ID of the sResource entry. X spSize
LongInt X spOffsetData
LongInt X spByteLanes
SignedByte DESCRIPTION
TheSReadLong
function returns the 32-bit value pointed to by the offset field of an sResource entry. In the Slot Manager parameter block you point to in the spBlkPtr parameter, you provide a pointer to the sResource in thespsPointer
field and specify the ID of the entry in thespID
field. TheSReadLong
function returns the long word value in thespResult
field.SPECIAL CONSIDERATIONS
This function may alter the values of thespSize
,spOffsetData
, andspByteLanes
fields 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 theSReadLong
function are
Trap macro Selector _SlotManager $0002 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 $0002
Registers on exit D0 Result code RESULT CODES
noErr 0 No error smNoMoresRsrcs -344 Requested sResource not found