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


SCSICreateRefNumXref

You use the SCSICreateRefNumXref function to register a device driver with the XPT.

OSErr SCSIAction(SCSIDriverPB *scsiPB);
scsiPB
A pointer to a SCSI driver identification parameter block, which is described on page 4-35.
-->scsiPBLengthUInt16The size of the parameter block.
-->scsiFunctionCodeUInt8The SCSICreateRefNumXref function selector code (0x85).
<--scsiResultOSErrThe returned result code.
-->scsiDeviceDeviceIdentThe device identification record.
-->scsiCompletionCallbackProcUnused. Must be set to nil.
-->scsiDriverSInt16The driver reference number.
-->scsiDriverFlagsUInt16Optional driver flags.

DESCRIPTION
The SCSICreateRefNumXref function adds an element to the XPT's driver registration table. You specify a device identification record in the scsiDevice field and a driver reference number in the scsiDriver field. The scsiDriverFlags field provides information about the driver that other clients can access using the SCSILookupRefNumXref function. The XPT does not interpret these flags.

A device identification record can have only one driver reference number associated with it, but a driver reference number may be registered to multiple devices. This function returns the scsiDeviceConflict result code if a driver is already registered to the specified device identification record.

Because this function is always executed synchronously, the scsiCompletion field must be set to nil.

SPECIAL CONSIDERATIONS
The SCSICreateRefNumXref function is executed synchronously and may move memory; you should not call it at interrupt time.

RESULT CODES
noErr0No error
scsiQLinkInvalid-7881The qLink field was not 0
scsiDeviceConflict-7883Attempt to register more than one driver to a device
SEE ALSO
See "Loading and Initializing a Driver," beginning on page 4-11, for more information about how device drivers are registered with the XPT.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996