Important: The information in this document is obsolete and should not be used for new development.
SetSRsrcState
You can use theSetSRsrcState
function to select which sResources are enabled.
FUNCTION SetSRsrcState (spBlkPtr: SpBlockPtr): OSErr;
- spBlkPtr
- A pointer to a Slot Manager parameter block.
--> spParamData
LongInt Either a value of 0 to enable the sResource or a value of 1 to disable it. --> spSlot
SignedByte The slot number. --> spId
SignedByte The sResource ID. --> spExtDev
SignedByte The external device identifier. DESCRIPTION
TheSetSRsrcState
function enables or disables an sResource. All of the Slot Manager functions recognize enabled sResources, while only theSGetSRsrc
andSGetTypeSRsrc
functions (described on page 2-33 and page 2-35, respectively) can recognize disabled ones.You specify the sResource to enable or disable with the
spSlot
,spID
, andspExtDev
fields of the Slot Manager parameter block you point to in the spBlkPtr parameter, and you specify whether to enable or disable it in thespParamData
field. The Slot Manager enables the sResource when thespParamData
field has a value of 0 and disables it when the field has a value of 1.SPECIAL CONSIDERATIONS
TheSetSRsrcState
function is available only with version 1 or later of the Slot Manager. You can use theSVersion
function, described on page 2-30, to determine whether the Slot Manager is version 1 or later.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSetSRsrcState
function are
Trap macro Selector _SlotManager $0009 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 $0009
Registers on exit D0 Result code RESULT CODES
noErr 0 No error smNoMoresRsrcs -344 Requested sResource not found SEE ALSO
For more information on enabling and disabling sResources, see "Enabling and Disabling sResources" on page 2-18.For information on finding disabled sResources, see the description of the
SGetSRsrc
function on page 2-33 and the description of theSGetTypeSRsrc
function on page 2-35.