FindDriversForDevice finds the driver from a file and from a device tree property that represents the "best" driver for a device--that is, the latest version of the most appropriate driver, regardless of whether it is file-based or property-based. The algorithm for determining the best driver is described in Matching Drivers With Devices.
OSErr FindDriversForDevice(
RegEntryIDPtr device,
FSSpec *fragmentSpec,
DriverDescription *fileDriverDesc,
Ptr *memAddr,
long *length,
StringPtr fragName,
DriverDescription *memDriverDesc);
Given a pointer to the RegEntryID value of a device, FindDriversForDevice finds the most suitable driver for that device. If the driver is located in a file, it returns a pointer to the driver's file system specification in fragmentSpec and a pointer to its driver description in fileDriverDesc. If the driver is a fragment located in memory, FindDriversForDevice returns a pointer to its address in memAddr, its length in length, its name in fragName, and a pointer to its driver description in memDriverDesc. FindDriversForDevice initializes all outputs to nil before searching for drivers.
The fragName parameter that FindDriversForDevice returns can be passed to GetDriverMemoryFragment or GetDriverDiskFragment.
noErr
|
0 | No error |
fnfErr
|
-43 | File not found |
All CFM errors (see Inside Macintosh: PowerPC System Software) |