PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

GetDriverInformation

GetDriverInformation returns a number of pieces of information about an installed driver.

OSErr GetDriverInformation(
                     DriverRefNum refNum,
                     UnitNumber *unitNum,
                     DriverFlags *flags,
                     DriverOpenCount *count,
                     StringPtr name,
                     RegEntryID *device,
                     CFragHFSLocator *driverLoadLocation,
                     CFragConnectionID *fragmentConnID,
                     DriverEntryPointPtr *fragmentMain,
                     DriverDescription *driverDesc);
refNum
Reference number of driver to examine.
unitNum
Resulting unit number.
flags
Resulting DCE flag bits.
count
Number of times driver has been opened.
name
Resulting driver name.
device
Resulting Name Registry device specification.
driverLoadLocation
Resulting CFM fragment locator from which driver was loaded.
fragmentConnID
Resulting CFM connection ID.
fragmentMain
Resulting pointer to DoDriverIO.
driverDesc
Resulting pointer to DriverDescription.
DESCRIPTION

Given the unit table reference number of an installed driver, GetDriverInformation returns the driver's unit number in unitNum, its DCE flags in flags, the number of times it has been opened in count, its name in name, its RegEntryID value in device, its CFM fragment locator in driverLoadLocation, its CFM connection ID in fragmentConnID, its DoDriverIO entry point in fragmentMain, and its driver description in driverDesc.

Code that calls GetDriverInformation must always supply an FSSpec file specification with the CFM locator. For an example, see Listing 9-3.

Note

With 68K drivers, GetDriverInformation returns meaningful information in only the unit Num, flags, count, and name parameters.

RESULT CODES
noErr 0 No error
badUnitErr -21 Bad unit number
unitEmptyErr -22 Empty unit number

© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)