GetDriverForDevice loads the "best" driver for a device from memory. The algorithm for determining the best driver is described in Matching Drivers With Devices.
OSErr GetDriverForDevice(
RegEntryIDPtr device,
CFragConnectionID *fragmentConnID,
DriverEntryPointPtr *fragmentMain,
DriverDescriptionPtr *driverDesc);
Given a pointer to the RegEntryID value of a device, GetDriverForDevice loads from memory the most suitable driver for that device. It returns the loaded driver's CFM connectionID value in fragmentConnID, a pointer to its DoDriverIO entry point in fragmentMain, and a pointer to its driver description in driverDesc.
noErr
|
0 | No error |
fnfErr
|
-43 | File not found |
All CFM errors (See Inside Macintosh: PowerPC System Software) |