Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 2 - Slot Manager / Slot Manager Reference
Slot Manager Routines / Determining the Version of the Slot Manager


SVersion

You can use the SVersion function to determine which version of the Slot Manager is in use by the Macintosh Operating System.

FUNCTION SVersion (spBlkPtr: SpBlockPtr): OSErr;
spBlkPtr
A pointer to a Slot Manager parameter block.
<--spResultLongIntThe Slot Manager version number.
<--spsPointerPtrA pointer to additional information.

DESCRIPTION
The SVersion function returns the version number of the Slot Manager in the spResult field of the Slot Manager parameter block that you point to in the spBlkPtr parameter. Version number 1 corresponds to the RAM-based Slot Manager and version number 2 corresponds to the ROM-based Slot Manager. Versions of the Slot Manager prior to System 7 do not recognize the SVersion function and return the result code smSelOOBErr. The spsPointer field is reserved for future use as a pointer to additional information.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the SVersion function are
Trap macroSelector
_SlotManager$0008

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
A0Address of the parameter block
D0$0008
Registers on exit
D0Result code

RESULT CODES
noErr0No error
smSelOOBErr-338Selector out of bounds or function not implemented
SEE ALSO
For more information on the different versions of the Slot Manager, see "About the Slot Manager" on page 2-15.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996