Important: The information in this document is obsolete and should not be used for new development.
SCSILookupRefNumXref
You can use theSCSILookupRefNumXref
function to determine if a driver is installed for a SCSI device.
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 SCSILookupRefNumXref
function selector code (0x86).<-- 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. <-- scsiNextDevice DeviceIdent The device identification record of the next device in the driver registration table. DESCRIPTION
TheSCSILookupRefNumXref
function returns the driver reference number for a device. You specify a device identification record in thescsiDevice
field, and the function returns the driver reference number in thescsiDriver
field. If no driver is registered for the device, the function returnsnil
in thescsiDriver
field.The
scsiDriverFlags
field returns the flags that were set when the driver was registered. ThescsiNextDevice
field returns the device identification record of the next device in the driver registration table. If this is the last device in the table, the function returns 0xFF in thescsiNextDevice.bus
field.To find all registered drivers you should first call this function with a value of 0xFF in the
scsiDevice.bus
field. The function returns the device identification record of the first device in the list in thescsiNextDevice
field. You can then find other drivers by moving thescsiNextDevice
value into thescsiDevice
field and repeating the operation until the function returns 0xFF in thescsiNextDevice.bus
field.Because this function is always executed synchronously, the
scsiCompletion
field must be set tonil
.RESULT CODES
noErr 0 No error scsiQLinkInvalid -7881 The qLink
field was not 0