Mac OS 9
Devices.h File Reference

Device Manager Interfaces. More...

#include <OSUtils.h>
#include <Files.h>
#include <Quickdraw.h>
#include <NameRegistry.h>
#include <CodeFragments.h>
#include <Multiprocessing.h>
#include <DriverFamilyMatching.h>
#include <Disks.h>

Go to the source code of this file.

Data Structures

struct  DRVRHeader
 
struct  DCtlEntry
 
struct  AuxDCE
 
struct  DriverInitInfo
 
struct  DriverFinalInfo
 
union  IOCommandContents
 
struct  FileBasedDriverRecord
 
struct  FileBasedDriverDetailed
 

Macros

#define DECLARE_DRIVERDESCRIPTION(N_ADDITIONAL_SERVICES)
 
#define DriverRemove(refNum)   DrvrRemove(refNum)
 
#define PBControl(pb, async)   ((async) ? PBControlAsync(pb) : PBControlSync(pb))
 
#define PBStatus(pb, async)   ((async) ? PBStatusAsync(pb) : PBStatusSync(pb))
 
#define PBKillIO(pb, async)   ((async) ? PBKillIOAsync(pb) : PBKillIOSync(pb))
 
#define PBOpen(pb, async)   ((async) ? PBOpenAsync(pb) : PBOpenSync(pb))
 
#define PBClose(pb, async)   ((async) ? PBCloseAsync(pb) : PBCloseSync(pb))
 
#define PBRead(pb, async)   ((async) ? PBReadAsync(pb) : PBReadSync(pb))
 
#define PBWrite(pb, async)   ((async) ? PBWriteAsync(pb) : PBWriteSync(pb))
 

Typedefs

typedef struct DRVRHeader DRVRHeader
 
typedef DRVRHeaderDRVRHeaderPtr
 
typedef DRVRHeaderPtrDRVRHeaderHandle
 
typedef struct DCtlEntry DCtlEntry
 
typedef DCtlEntryDCtlPtr
 
typedef DCtlPtrDCtlHandle
 
typedef struct AuxDCE AuxDCE
 
typedef AuxDCEAuxDCEPtr
 
typedef AuxDCEPtrAuxDCEHandle
 
typedef UInt16 UnitNumber
 
typedef UInt32 DriverOpenCount
 
typedef SInt16 DriverRefNum
 
typedef SInt16 DriverFlags
 
typedef UInt32 IOCommandCode
 
typedef MPAddressSpaceID AddressSpaceID
 
typedef struct OpaqueIOCommandID * IOCommandID
 
typedef UInt32 IOCommandKind
 
typedef struct DriverInitInfo DriverInitInfo
 
typedef DriverInitInfoDriverInitInfoPtr
 
typedef DriverInitInfo DriverReplaceInfo
 
typedef DriverInitInfoDriverReplaceInfoPtr
 
typedef struct DriverFinalInfo DriverFinalInfo
 
typedef DriverFinalInfoDriverFinalInfoPtr
 
typedef DriverFinalInfo DriverSupersededInfo
 
typedef DriverFinalInfoDriverSupersededInfoPtr
 
typedef union IOCommandContents IOCommandContents
 
typedef IOCommandID CommandID
 
typedef IOCommandID IOCommandContents Contents
 
typedef IOCommandID IOCommandContents IOCommandCode Code
 
typedef IOCommandID IOCommandContents IOCommandCode IOCommandKind Kind
 
typedef struct FileBasedDriverRecord FileBasedDriverRecord
 
typedef FileBasedDriverRecordFileBasedDriverRecordPtr
 
typedef struct FileBasedDriverDetailed FileBasedDriverDetailed
 
typedef FileBasedDriverDetailedFileBasedDriverDetailedPtr
 

Enumerations

enum  {
  chooserInitMsg = 11 , newSelMsg = 12 , fillListMsg = 13 , getSelMsg = 14 ,
  selectMsg = 15 , deselectMsg = 16 , terminateMsg = 17 , buttonMsg = 19
}
 
enum  { chooserID = 1 }
 
enum  {
  initMsg = 1 , okMsg = 2 , cancelMsg = 3 , hitMsg = 4 ,
  nulMsg = 5 , updateMsg = 6 , activateMsg = 7 , deactivateMsg = 8 ,
  keyEvtMsg = 9 , superMsg = 10 , normalMsg = 11 , startupMsg = 12
}
 
enum  {
  goodbye = -1 , killCode = 1 , accEvent = 64 , accRun = 65 ,
  accCursor = 66 , accMenu = 67 , accUndo = 68 , accCut = 70 ,
  accCopy = 71 , accPaste = 72 , accClear = 73
}
 
enum  {
  ioInProgress = 1 , aRdCmd = 2 , aWrCmd = 3 , asyncTrpBit = 10 ,
  noQueueBit = 9
}
 
enum  {
  dReadEnable = 0 , dWritEnable = 1 , dCtlEnable = 2 , dStatEnable = 3 ,
  dNeedGoodBye = 4 , dNeedTime = 5 , dNeedLock
}
 
enum  {
  dNeedLockMask = 0x4000 , dNeedTimeMask , dNeedGoodByeMask = 0x1000 , dStatEnableMask = 0x0800 ,
  dCtlEnableMask = 0x0400 , dWritEnableMask = 0x0200 , dReadEnableMask = 0x0100
}
 
enum  { dVMImmuneBit = 0 , dOpened = 5 , dRAMBased = 6 , drvrActive = 7 }
 
enum  { dVMImmuneMask = 0x0001 , dOpenedMask = 0x0020 , dRAMBasedMask = 0x0040 , drvrActiveMask = 0x0080 }
 
enum  {
  kOpenCommand = 0 , kCloseCommand = 1 , kReadCommand = 2 , kWriteCommand = 3 ,
  kControlCommand = 4 , kStatusCommand = 5 , kKillIOCommand = 6 , kInitializeCommand = 7 ,
  kFinalizeCommand = 8 , kReplaceCommand = 9 , kSupersededCommand = 10 , kSuspendCommand = 11 ,
  kResumeCommand = 12
}
 
enum  { kPowerManagementCommand = 13 }
 
enum  { kSynchronousIOCommandKind = 0x00000001 , kAsynchronousIOCommandKind = 0x00000002 , kImmediateIOCommandKind = 0x00000004 }
 

Functions

typedef CALLBACK_API_C (OSErr, DriverEntryPointPtr)(AddressSpaceID SpaceID
 
SInt16 HigherDriverVersion (const NumVersion *driverVersion1, const NumVersion *driverVersion2)
 
OSErr VerifyFragmentAsDriver (CFragConnectionID fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
 
OSErr GetDriverMemoryFragment (Ptr memAddr, long length, ConstStr63Param fragName, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
 
OSErr GetDriverDiskFragment (FSSpecPtr fragmentSpec, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
 
OSErr GetNamedDriverDiskFragment (FSSpecPtr fragmentSpec, ConstStr63Param fragName, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
 
OSErr InstallDriverFromFragment (CFragConnectionID fragmentConnID, RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
 
OSErr InstallDriverFromFile (FSSpecPtr fragmentSpec, RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
 
OSErr InstallDriverFromMemory (Ptr memory, long length, ConstStr63Param fragName, RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
 
OSErr InstallDriverFromResource (SInt16 theRsrcID, ConstStr255Param theRsrcName, RegEntryIDPtr theDevice, UnitNumber theBeginningUnit, UnitNumber theEndingUnit, DriverRefNum *theRefNum)
 
OSErr InstallDriverFromDisk (Ptr theDriverName, RegEntryID *theDevice, UnitNumber theBeginningUnit, UnitNumber theEndingUnit, DriverRefNum *theRefNum)
 
OSErr FindDriversForDevice (RegEntryID *device, FSSpec *fragmentSpec, DriverDescription *fileDriverDesc, Ptr *memAddr, long *length, StringPtr fragName, DriverDescription *memDriverDesc)
 
OSErr FindDriverForDeviceFromFile (RegEntryID *device, FSSpec *fragmentSpec, DriverDescription *driverDesc, StringPtr fragName)
 
OSErr FindDriverCandidates (RegEntryID *deviceID, Ptr *propBasedDriver, RegPropertyValueSize *propBasedDriverSize, StringPtr deviceName, MacDriverType *propBasedDriverType, Boolean *gotPropBasedDriver, FileBasedDriverRecordPtr fileBasedDrivers, ItemCount *nFileBasedDrivers)
 
OSErr FindDriverCandidatesDetailed (RegEntryIDPtr deviceID, Ptr *propBasedDriver, RegPropertyValueSize *propBasedDriverSize, StringPtr deviceName, MacDriverType *propBasedDriverType, Boolean *gotPropBasedDriver, FileBasedDriverDetailedPtr fileBasedDrivers, ItemCount *nFileBasedDrivers)
 
OSErr ScanDriverCandidates (RegEntryID *deviceID, FileBasedDriverRecordPtr fileBasedDrivers, ItemCount nFileBasedDrivers, FileBasedDriverRecordPtr matchingDrivers, ItemCount *nMatchingDrivers)
 
OSErr ScanDriverCandidatesDetailed (RegEntryID *deviceID, FileBasedDriverDetailedPtr fileBasedDrivers, ItemCount nFileBasedDrivers, FileBasedDriverDetailedPtr matchingDrivers, ItemCount *nMatchingDrivers)
 
SInt16 CompareFileCandToPropCand (RegEntryID *device, StringPtr deviceName, DriverTypePtr propBasedCandidate, FileBasedDriverRecordPtr fileBasedCandidate)
 
void GetCompatibleProperty (RegEntryID *device, StringPtr *compatibleNames, ItemCount *nCompatibleNames)
 
Boolean CompatibleDriverNames (StringPtr nameInfoStr, StringPtr compatibleNames, ItemCount nCompatibleNames, long *nameCount)
 
OSErr GetDriverForDevice (RegEntryID *device, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
 
OSErr InstallDriverForDevice (RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
 
OSErr GetDriverInformation (DriverRefNum refNum, UnitNumber *unitNum, DriverFlags *flags, DriverOpenCount *count, StringPtr name, RegEntryID *device, CFragSystem7Locator *driverLoadLocation, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescription *driverDesc)
 
OSErr GetDriverDescription (LogicalAddress fragmentPtr, DriverDescriptionPtr *theDriverDesc)
 
OSStatus GetNamedDriverDescFromFSSpec (FSSpecPtr fragmentSpec, StringPtr fragName, DriverDescriptionPtr *driverDesc)
 
OSErr SetDriverClosureMemory (CFragConnectionID fragmentConnID, Boolean holdDriverMemory)
 
OSErr ReplaceDriverWithFragment (DriverRefNum theRefNum, CFragConnectionID fragmentConnID)
 
OSErr OpenInstalledDriver (DriverRefNum refNum, SInt8 ioPermission)
 
OSErr RenameDriver (DriverRefNum refNum, StringPtr newDriverName)
 
OSErr RemoveDriver (DriverRefNum refNum, Boolean immediate)
 
OSErr LookupDrivers (UnitNumber beginningUnit, UnitNumber endingUnit, Boolean emptyUnits, ItemCount *returnedRefNums, DriverRefNum *refNums)
 
UnitNumber HighestUnitNumber (void)
 
OSErr DriverGestaltOn (DriverRefNum refNum)
 
OSErr DriverGestaltOff (DriverRefNum refNum)
 
Boolean DriverGestaltIsOn (DriverFlags flags)
 
OSErr PBOpenSync (ParmBlkPtr paramBlock)
 
OSErr PBOpenAsync (ParmBlkPtr paramBlock)
 
OSErr PBOpenImmed (ParmBlkPtr paramBlock)
 
OSErr PBCloseSync (ParmBlkPtr paramBlock)
 
OSErr PBCloseAsync (ParmBlkPtr paramBlock)
 
OSErr PBCloseImmed (ParmBlkPtr paramBlock)
 
OSErr PBReadSync (ParmBlkPtr paramBlock)
 
OSErr PBReadAsync (ParmBlkPtr paramBlock)
 
OSErr PBReadImmed (ParmBlkPtr paramBlock)
 
OSErr PBWriteSync (ParmBlkPtr paramBlock)
 
OSErr PBWriteAsync (ParmBlkPtr paramBlock)
 
OSErr PBWriteImmed (ParmBlkPtr paramBlock)
 
OSErr PBWaitIOComplete (ParmBlkPtr paramBlock, Duration timeout)
 
DCtlHandle GetDCtlEntry (short refNum)
 
OSErr DriverInstall (DRVRHeaderPtr drvrPtr, short refNum)
 
OSErr DriverInstallReserveMem (DRVRHeaderPtr drvrPtr, short refNum)
 
OSErr DrvrRemove (short refNum)
 
OSErr MacOpenDriver (ConstStr255Param name, short *drvrRefNum)
 
OSErr MacCloseDriver (short refNum)
 
OSErr Control (short refNum, short csCode, const void *csParamPtr)
 
OSErr Status (short refNum, short csCode, void *csParamPtr)
 
OSErr KillIO (short refNum)
 Terminate all current and pending device driver reads and writes. More...
 
long Fetch (DCtlPtr dce)
 
long Stash (DCtlPtr dce, char data)
 
void IODone (DCtlPtr dce, OSErr ioResult)
 
OSErr PBControlSync (ParmBlkPtr paramBlock)
 
OSErr PBControlAsync (ParmBlkPtr paramBlock)
 
OSErr PBControlImmed (ParmBlkPtr paramBlock)
 
OSErr PBStatusSync (ParmBlkPtr paramBlock)
 
OSErr PBStatusAsync (ParmBlkPtr paramBlock)
 
OSErr PBStatusImmed (ParmBlkPtr paramBlock)
 
OSErr PBKillIOSync (ParmBlkPtr paramBlock)
 
OSErr PBKillIOAsync (ParmBlkPtr paramBlock)
 
OSErr PBKillIOImmed (ParmBlkPtr paramBlock)
 
short OpenDeskAcc (ConstStr255Param deskAccName)
 
 if (HiWord(mr)==FILE_MENU)
 Close a desk accessory. More...
 

Detailed Description

Device Manager Interfaces.

Introduced In: Mac OS 8
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 1985-2001 by Apple Computer, Inc., all rights reserved

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ DECLARE_DRIVERDESCRIPTION

#define DECLARE_DRIVERDESCRIPTION (   N_ADDITIONAL_SERVICES)
Value:
struct \
{ \
DriverDescription fixed; \
DriverServiceInfo additional_service[N_ADDITIONAL_SERVICES - 1]; \
};

Function Documentation

◆ CompareFileCandToPropCand()

SInt16 CompareFileCandToPropCand ( RegEntryID device,
StringPtr  deviceName,
DriverTypePtr  propBasedCandidate,
FileBasedDriverRecordPtr  fileBasedCandidate 
)

CompareFileCandToPropCand()

Non-Carbon CFM: in DriverLoaderLib 2.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ CompatibleDriverNames()

Boolean CompatibleDriverNames ( StringPtr  nameInfoStr,
StringPtr  compatibleNames,
ItemCount  nCompatibleNames,
long *  nameCount 
)

CompatibleDriverNames()

Non-Carbon CFM: in DriverLoaderLib 2.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ Control()

OSErr Control ( short  refNum,
short  csCode,
const void *  csParamPtr 
)

Control()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ DriverGestaltIsOn()

Boolean DriverGestaltIsOn ( DriverFlags  flags)

DriverGestaltIsOn()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ DriverGestaltOff()

OSErr DriverGestaltOff ( DriverRefNum  refNum)

DriverGestaltOff()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ DriverGestaltOn()

OSErr DriverGestaltOn ( DriverRefNum  refNum)

DriverGestaltOn()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ DriverInstall()

OSErr DriverInstall ( DRVRHeaderPtr  drvrPtr,
short  refNum 
)

SetChooserAlert used to simply set a bit in a low-mem global to tell the Chooser not to display its warning message when the printer is changed. However, under MultiFinder and System 7, this low-mem is swapped out when a layer change occurs, and the Chooser never sees the change. It is obsolete, and completely unsupported on the PowerPC. 68K apps can still call it if they wish.

pascal Boolean SetChooserAlert(Boolean f); DriverInstall()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ DriverInstallReserveMem()

OSErr DriverInstallReserveMem ( DRVRHeaderPtr  drvrPtr,
short  refNum 
)

DriverInstallReserveMem()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ DrvrRemove()

OSErr DrvrRemove ( short  refNum)

Note: DrvrInstall() is no longer supported, becuase it never really worked anyways. There will soon be a DriverInstall() which does the right thing.

  DrvrRemove has been renamed to DriverRemove.  But, InterfaceLib for

PowerPC still exports DrvrRemove, so a macro is used to map the new name to old. DrvrRemove()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ Fetch()

long Fetch ( DCtlPtr  dce)

Fetch()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ FindDriverCandidates()

OSErr FindDriverCandidates ( RegEntryID deviceID,
Ptr *  propBasedDriver,
RegPropertyValueSize propBasedDriverSize,
StringPtr  deviceName,
MacDriverType propBasedDriverType,
Boolean gotPropBasedDriver,
FileBasedDriverRecordPtr  fileBasedDrivers,
ItemCount *  nFileBasedDrivers 
)

FindDriverCandidates()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ FindDriverCandidatesDetailed()

OSErr FindDriverCandidatesDetailed ( RegEntryIDPtr  deviceID,
Ptr *  propBasedDriver,
RegPropertyValueSize propBasedDriverSize,
StringPtr  deviceName,
MacDriverType propBasedDriverType,
Boolean gotPropBasedDriver,
FileBasedDriverDetailedPtr  fileBasedDrivers,
ItemCount *  nFileBasedDrivers 
)

FindDriverCandidatesDetailed()

Non-Carbon CFM: in DriverLoaderLib 2.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ FindDriverForDeviceFromFile()

OSErr FindDriverForDeviceFromFile ( RegEntryID device,
FSSpec *  fragmentSpec,
DriverDescription driverDesc,
StringPtr  fragName 
)

FindDriverForDeviceFromFile()

Non-Carbon CFM: in DriverLoaderLib 2.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ FindDriversForDevice()

OSErr FindDriversForDevice ( RegEntryID device,
FSSpec *  fragmentSpec,
DriverDescription fileDriverDesc,
Ptr *  memAddr,
long *  length,
StringPtr  fragName,
DriverDescription memDriverDesc 
)

FindDriversForDevice()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetCompatibleProperty()

void GetCompatibleProperty ( RegEntryID device,
StringPtr compatibleNames,
ItemCount *  nCompatibleNames 
)

GetCompatibleProperty()

Non-Carbon CFM: in DriverLoaderLib 2.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetDCtlEntry()

DCtlHandle GetDCtlEntry ( short  refNum)

GetDCtlEntry()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetDriverDescription()

OSErr GetDriverDescription ( LogicalAddress  fragmentPtr,
DriverDescriptionPtr theDriverDesc 
)

GetDriverDescription()

Non-Carbon CFM: in DriverLoaderLib 2.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetDriverDiskFragment()

OSErr GetDriverDiskFragment ( FSSpecPtr  fragmentSpec,
CFragConnectionID *  fragmentConnID,
DriverEntryPointPtr *  fragmentMain,
DriverDescriptionPtr driverDesc 
)

GetDriverDiskFragment()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetDriverForDevice()

OSErr GetDriverForDevice ( RegEntryID device,
CFragConnectionID *  fragmentConnID,
DriverEntryPointPtr *  fragmentMain,
DriverDescriptionPtr driverDesc 
)

GetDriverForDevice()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetDriverInformation()

OSErr GetDriverInformation ( DriverRefNum  refNum,
UnitNumber *  unitNum,
DriverFlags *  flags,
DriverOpenCount *  count,
StringPtr  name,
RegEntryID device,
CFragSystem7Locator driverLoadLocation,
CFragConnectionID *  fragmentConnID,
DriverEntryPointPtr *  fragmentMain,
DriverDescription driverDesc 
)

GetDriverInformation()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetDriverMemoryFragment()

OSErr GetDriverMemoryFragment ( Ptr  memAddr,
long  length,
ConstStr63Param  fragName,
CFragConnectionID *  fragmentConnID,
DriverEntryPointPtr *  fragmentMain,
DriverDescriptionPtr driverDesc 
)

GetDriverMemoryFragment()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetNamedDriverDescFromFSSpec()

OSStatus GetNamedDriverDescFromFSSpec ( FSSpecPtr  fragmentSpec,
StringPtr  fragName,
DriverDescriptionPtr driverDesc 
)

GetNamedDriverDescFromFSSpec()

Non-Carbon CFM: in DriverLoaderLib 2.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetNamedDriverDiskFragment()

OSErr GetNamedDriverDiskFragment ( FSSpecPtr  fragmentSpec,
ConstStr63Param  fragName,
CFragConnectionID *  fragmentConnID,
DriverEntryPointPtr *  fragmentMain,
DriverDescriptionPtr driverDesc 
)

GetNamedDriverDiskFragment()

Non-Carbon CFM: in DriverLoaderLib 2.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ HigherDriverVersion()

SInt16 HigherDriverVersion ( const NumVersion driverVersion1,
const NumVersion driverVersion2 
)

HigherDriverVersion()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ HighestUnitNumber()

UnitNumber HighestUnitNumber ( void  )

HighestUnitNumber()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ if()

if ( HiWord(mr)  = = FILE_MENU)

Close a desk accessory.

Call CloseDeskAcc when the user selects the Close item of your File menu
and the frontmost window is that of a DA. The DA window is removed from the
screen and the next-to-frontmost window is reactivated.
daRefNum identifies the DA to close. The value to use is stored in the
windowKind field of the DA's window (see the example, below).
Returns
none
Note
There is no need to use this call when the user closes a DA by clicking its
Close box; in that case the Desk Manager takes care of it. Use
CloseDeskAcc only when a system window is frontmost and the user
picks Close from your File menu.
It is incorrect to use the daRefNum  returned from a previous call to
OpenDeskAcc . The DA reference number is stored in the DA's
WindowRecord . It is a negative number in the windowKind field. This has
ramifications for DAs (see IsDialogEvent ). For non-DA applications, a
typical sequence might include:
Boolean isMyWindow ( WindowPtr theWindow);
WindowPeek wPeek;
long mr;
EventRecord theEvent;
WindowRecord whichWindow;
if(WaitNextEvent (everyEvent , &theEvent, 0, nil)) {
if ( theEvent. what == mouseDown ) {
switch ( FindWindow ( theEvent. where, &whichWindow ) ) {
case inMenuBar :
mr = MenuSelect ( theEvent. where );/* user interaction

opendeskacc()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

opendriver()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

The PBxxx() routines are obsolete.

Use the PBxxxSync(), PBxxxAsync(), or PBxxxImmed version instead.

◆ InstallDriverForDevice()

OSErr InstallDriverForDevice ( RegEntryID device,
UnitNumber  beginningUnit,
UnitNumber  endingUnit,
DriverRefNum *  refNum 
)

InstallDriverForDevice()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ InstallDriverFromDisk()

OSErr InstallDriverFromDisk ( Ptr  theDriverName,
RegEntryID theDevice,
UnitNumber  theBeginningUnit,
UnitNumber  theEndingUnit,
DriverRefNum *  theRefNum 
)

InstallDriverFromDisk()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ InstallDriverFromFile()

OSErr InstallDriverFromFile ( FSSpecPtr  fragmentSpec,
RegEntryID device,
UnitNumber  beginningUnit,
UnitNumber  endingUnit,
DriverRefNum *  refNum 
)

InstallDriverFromFile()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ InstallDriverFromFragment()

OSErr InstallDriverFromFragment ( CFragConnectionID  fragmentConnID,
RegEntryID device,
UnitNumber  beginningUnit,
UnitNumber  endingUnit,
DriverRefNum *  refNum 
)

InstallDriverFromFragment()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ InstallDriverFromMemory()

OSErr InstallDriverFromMemory ( Ptr  memory,
long  length,
ConstStr63Param  fragName,
RegEntryID device,
UnitNumber  beginningUnit,
UnitNumber  endingUnit,
DriverRefNum *  refNum 
)

InstallDriverFromMemory()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ InstallDriverFromResource()

OSErr InstallDriverFromResource ( SInt16  theRsrcID,
ConstStr255Param  theRsrcName,
RegEntryIDPtr  theDevice,
UnitNumber  theBeginningUnit,
UnitNumber  theEndingUnit,
DriverRefNum *  theRefNum 
)

InstallDriverFromResource()

Non-Carbon CFM: in DriverLoaderLib 2.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ IODone()

void IODone ( DCtlPtr  dce,
OSErr  ioResult 
)

IODone()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ KillIO()

OSErr KillIO ( short  refNum)

Terminate all current and pending device driver reads and writes.

KillIO immediately terminates all communication with the device driver
indicated by the reference number. Unlike CloseDriver , it does NOT wait to
complete any pending I/O.
refNum is the reference number of an open device driver. See OpenDriver
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
badUnitErr (-21) refNum doesn't match unit table
unitEmptyErr (-22) refnum specifies NIL handle in unit table
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ LookupDrivers()

OSErr LookupDrivers ( UnitNumber  beginningUnit,
UnitNumber  endingUnit,
Boolean  emptyUnits,
ItemCount *  returnedRefNums,
DriverRefNum *  refNums 
)

LookupDrivers()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ MacCloseDriver()

OSErr MacCloseDriver ( short  refNum)

[Mac]CloseDriver()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ MacOpenDriver()

OSErr MacOpenDriver ( ConstStr255Param  name,
short *  drvrRefNum 
)

[Mac]OpenDriver()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ OpenDeskAcc()

short OpenDeskAcc ( ConstStr255Param  deskAccName)

OpenDeskAcc()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ OpenInstalledDriver()

OSErr OpenInstalledDriver ( DriverRefNum  refNum,
SInt8  ioPermission 
)

OpenInstalledDriver()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBCloseAsync()

OSErr PBCloseAsync ( ParmBlkPtr  paramBlock)

PBCloseAsync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PBCloseImmed()

OSErr PBCloseImmed ( ParmBlkPtr  paramBlock)

PBCloseImmed()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBCloseSync()

OSErr PBCloseSync ( ParmBlkPtr  paramBlock)

PBCloseSync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PBControlAsync()

OSErr PBControlAsync ( ParmBlkPtr  paramBlock)

PBControlAsync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBControlImmed()

OSErr PBControlImmed ( ParmBlkPtr  paramBlock)

PBControlImmed()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBControlSync()

OSErr PBControlSync ( ParmBlkPtr  paramBlock)

PBControlSync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBKillIOAsync()

OSErr PBKillIOAsync ( ParmBlkPtr  paramBlock)

PBKillIOAsync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBKillIOImmed()

OSErr PBKillIOImmed ( ParmBlkPtr  paramBlock)

PBKillIOImmed()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBKillIOSync()

OSErr PBKillIOSync ( ParmBlkPtr  paramBlock)

PBKillIOSync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBOpenAsync()

OSErr PBOpenAsync ( ParmBlkPtr  paramBlock)

PBOpenAsync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBOpenImmed()

OSErr PBOpenImmed ( ParmBlkPtr  paramBlock)

PBOpenImmed()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBOpenSync()

OSErr PBOpenSync ( ParmBlkPtr  paramBlock)

PBOpenSync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBReadAsync()

OSErr PBReadAsync ( ParmBlkPtr  paramBlock)

PBReadAsync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PBReadImmed()

OSErr PBReadImmed ( ParmBlkPtr  paramBlock)

PBReadImmed()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBReadSync()

OSErr PBReadSync ( ParmBlkPtr  paramBlock)

PBReadSync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PBStatusAsync()

OSErr PBStatusAsync ( ParmBlkPtr  paramBlock)

PBStatusAsync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBStatusImmed()

OSErr PBStatusImmed ( ParmBlkPtr  paramBlock)

PBStatusImmed()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBStatusSync()

OSErr PBStatusSync ( ParmBlkPtr  paramBlock)

PBStatusSync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBWaitIOComplete()

OSErr PBWaitIOComplete ( ParmBlkPtr  paramBlock,
Duration  timeout 
)

PBWaitIOComplete is a friendly way for applications to monitor a pending asynchronous I/O operation in power-managed and preemptive multitasking systems. PBWaitIOComplete()

Non-Carbon CFM: in InterfaceLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PBWriteAsync()

OSErr PBWriteAsync ( ParmBlkPtr  paramBlock)

PBWriteAsync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PBWriteImmed()

OSErr PBWriteImmed ( ParmBlkPtr  paramBlock)

PBWriteImmed()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PBWriteSync()

OSErr PBWriteSync ( ParmBlkPtr  paramBlock)

PBWriteSync()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RemoveDriver()

OSErr RemoveDriver ( DriverRefNum  refNum,
Boolean  immediate 
)

RemoveDriver()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ RenameDriver()

OSErr RenameDriver ( DriverRefNum  refNum,
StringPtr  newDriverName 
)

RenameDriver()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ ReplaceDriverWithFragment()

OSErr ReplaceDriverWithFragment ( DriverRefNum  theRefNum,
CFragConnectionID  fragmentConnID 
)

ReplaceDriverWithFragment()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ ScanDriverCandidates()

OSErr ScanDriverCandidates ( RegEntryID deviceID,
FileBasedDriverRecordPtr  fileBasedDrivers,
ItemCount  nFileBasedDrivers,
FileBasedDriverRecordPtr  matchingDrivers,
ItemCount *  nMatchingDrivers 
)

ScanDriverCandidates()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ ScanDriverCandidatesDetailed()

OSErr ScanDriverCandidatesDetailed ( RegEntryID deviceID,
FileBasedDriverDetailedPtr  fileBasedDrivers,
ItemCount  nFileBasedDrivers,
FileBasedDriverDetailedPtr  matchingDrivers,
ItemCount *  nMatchingDrivers 
)

ScanDriverCandidatesDetailed()

Non-Carbon CFM: in DriverLoaderLib 2.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ SetDriverClosureMemory()

OSErr SetDriverClosureMemory ( CFragConnectionID  fragmentConnID,
Boolean  holdDriverMemory 
)

SetDriverClosureMemory()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ Stash()

long Stash ( DCtlPtr  dce,
char  data 
)

Stash()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ Status()

OSErr Status ( short  refNum,
short  csCode,
void *  csParamPtr 
)

Status()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ VerifyFragmentAsDriver()

OSErr VerifyFragmentAsDriver ( CFragConnectionID  fragmentConnID,
DriverEntryPointPtr *  fragmentMain,
DriverDescriptionPtr driverDesc 
)

VerifyFragmentAsDriver()

Non-Carbon CFM: in DriverLoaderLib 1.0 and later
Carbon Lib: not available
Mac OS X: not available