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


  

OpenInstalledDriver

OpenInstalledDriver opens a driver that is already installed in the unit table.

OSErr OpenInstalledDriver(
                     DriverRefNum refNum,
                     SInt8 ioPermission);
refNum
Unit table reference number.
ioPermission
I/O permission code:
fsCurPerm
0  use the current permission
fsRdPerm
1  allow read actions only
fsWrPerm
2  allow write actions only
fsRdWrPerm
3  allow both read and write actions
DESCRIPTION

Given an installed driver's unit table reference number, OpenInstalledDriver opens the driver. The Device Manager ignores the ioPermission parameter; it is included only to provide easy communication with the driver.

IMPORTANT

Native drivers may keep track of I/O permissions for each instance of multiple open actions and return error codes if permissions are violated.

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)