Important: The information in this document is obsolete and should not be used for new development.
SCSICreateRefNumXref
You use theSCSICreateRefNumXref
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.
--> scsiPBLength UInt16 The size of the parameter block. --> scsiFunctionCode UInt8 The SCSICreateRefNumXref
function selector code (0x85).<-- scsiResult OSErr The returned result code. --> scsiDevice DeviceIdent The device identification record. --> scsiCompletion CallbackProc Unused. Must be set to nil
.--> scsiDriver SInt16 The driver reference number. --> scsiDriverFlags UInt16 Optional driver flags. DESCRIPTION
TheSCSICreateRefNumXref
function adds an element to the XPT's driver registration table. You specify a device identification record in thescsiDevice
field and a driver reference number in thescsiDriver
field. ThescsiDriverFlags
field provides information about the driver that other clients can access using theSCSILookupRefNumXref
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 tonil
.SPECIAL CONSIDERATIONS
TheSCSICreateRefNumXref
function is executed synchronously and may move memory; you should not call it at interrupt time.RESULT CODES
noErr 0 No error scsiQLinkInvalid -7881 The qLink
field was not 0scsiDeviceConflict -7883 Attempt 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.