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 4 - SCSI Manager 4.3 / SCSI Manager 4.3 Reference
SCSI Manager 4.3 Functions / Client Functions


SCSILoadDriver

The Start Manager uses the SCSILoadDriver function to provide an opportunity for a SIM to load a driver other than one found on the media.

OSErr SCSIAction(SCSILoadDriverPB *scsiPB);
scsiPB
A pointer to a SCSI load driver parameter block, which is described on page 4-34.
-->scsiPBLengthUInt16The size of the parameter block.
-->scsiFunctionCodeUInt8The SCSILoadDriver function selector code (0x82).
<--scsiResultOSErrThe returned result code.
-->scsiDeviceDeviceIdentThe device identification record.
-->scsiCompletionCallbackProcA pointer to a completion routine.
If this field is set to nil, the function is executed synchronously.
-->scsiDriverStorageUInt8 *Optional pointer to the device driver's private storage.
<--scsiLoadedRefNumUInt16The driver reference number returned by the SIM.
-->scsiDiskLoadFailedBooleanSet to true if a driver could not be loaded from the media.

DESCRIPTION
The SCSILoadDriver function is called by the Start Manager to load device drivers for SCSI devices. You can use this function to load a driver for a device that was not available at system startup.

The Start Manager can call this function both before and after attempting to load a driver from the media. On the first attempt, the scsiDiskLoadFailed field is set to false, indicating to the SIM that it can choose to load a driver from the media or install another (typically newer) driver of its own choosing.

If the first attempt to load a driver fails, the Start Manager calls the SCSILoadDriver function a second time, with the scsiDiskLoadFailed field set to true to indicate that a driver could not be loaded from the media. The SIM then loads its own driver, if possible, or returns an error result.

SPECIAL CONSIDERATIONS
The SCSILoadDriver function may move memory; you should not call it at interrupt time.

RESULT CODES
noErr0No error
scsiFunctionNotAvailable-7871The requested function is not supported by this SIM

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996