Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 5 - ADB Manager / ADB Manager Reference
ADB Manager Routines / Getting ADB Device Information


You can use the GetIndADB function to get information about an ADB device, specified by its index in the ADB device table.

FUNCTION GetIndADB (VAR info: ADBDataBlock; 
                   devTableIndex: Integer): ADBAddress;
An ADB data block. On exit, the fields of this parameter block are filled with information about the specified ADB device.
An index into the ADB device table.
<--devTypeSignedByteThe device handler ID.
<--origADBAddrSignedByteThe device's default ADB address.
<--dbServiceRtPtrPtrThe address of the device's device handler routine.
<--dbDataAreaAddrPtrThe address of the device handler's data storage area.

The GetIndADB function returns information from the ADB device table entry whose index number is specified by the devTableIndex parameter. The information is returned in an ADB data block, passed in the info parameter.

The GetIndADB function also returns the current ADB address of the specified device as its function result. If, however, GetIndADB is unable to find the specified entry in the ADB device table, it returns a negative value as its function result. In that case, the fields of the info data block are undefined.

Once the ADB Manager has set the initial values for an ADB device in the ADB device table, it updates the device table entry for the device to reflect changes only to the address of the device handler routine and data area pointer.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996