Important: The Device Manager is deprecated as of Mac OS X v10.5. You should use the I/O Kit or the File Manager instead.
| Framework |
CoreServices/CoreServices.h |
| Declared in | Devices.h Files.h IOMacOSTypes.h |
Important: The Device Manager is deprecated as of Mac OS X v10.5. You should use the I/O Kit or the File Manager instead.
In Mac OS 9 and earlier, applications used the Device Manager to open, close, and exchange information with device drivers. In addition, device drivers used the Device Manager when they needed to supply a user interface. In Mac OS X, applications that need to communicate directly with hardware devices must use the I/O Kit. For more information about the I/O Kit, see I/O Kit Fundamentals.
Mac OS X applications can access serial devices through the device file system. You can use the I/O Kit to obtain a path to a device file in the /dev directory, and then use traditional UNIX serial port access through the POSIX termios API. For more information, see Accessing Hardware From Applications.
Other software products that relied on the Device Manager in the past, such as desk accessories, should be converted into Mac OS X applications.
Note: The Device Manager header file Devices.h has been removed in Mac OS X v10.5 and later. The functions previously declared in this header file are now declared in Files.h. Documentation for these deprecated functions is available in File Manager Reference.
typedef MPAddressSpaceID AddressSpaceID;
IOMacOSTypes.h
struct AuxDCE {
Ptr dCtlDriver;
volatile SInt16 dCtlFlags;
QHdr dCtlQHdr;
SInt32 dCtlPosition;
Handle dCtlStorage;
SInt16 dCtlRefNum;
SInt32 dCtlCurTicks;
GrafPtr dCtlWindow;
SInt16 dCtlDelay;
SInt16 dCtlEMask;
SInt16 dCtlMenu;
SInt8 dCtlSlot;
SInt8 dCtlSlotId;
SInt32 dCtlDevBase;
Ptr dCtlOwner;
SInt8 dCtlExtDev;
SInt8 fillByte;
UInt32 dCtlNodeID;
};
typedef AuxDCE* AuxDCEPtr;
typedef AuxDCEPtr* AuxDCEHandle;
struct DCtlEntry {
Ptr dCtlDriver;
volatile SInt16 dCtlFlags;
QHdr dCtlQHdr;
volatile SInt32 dCtlPosition;
Handle dCtlStorage;
SInt16 dCtlRefNum;
SInt32 dCtlCurTicks;
GrafPtr dCtlWindow;
SInt16 dCtlDelay;
SInt16 dCtlEMask;
SInt16 dCtlMenu;
};
typedef DCtlEntry* DCtlPtr;
typedef DCtlPtr* DCtlHandle;
struct DriverFinalInfo {
DriverRefNum refNum;
RegEntryID deviceEntry;
};
typedef DriverFinalInfo* DriverFinalInfoPtr;
struct DriverInitInfo {
DriverRefNum refNum;
RegEntryID deviceEntry;
};
typedef DriverInitInfo* DriverInitInfoPtr;
typedef UInt32 DriverOpenCount;
Devices.h
typedef SInt16 DriverRefNum;
Devices.h
typedef DriverInitInfo DriverReplaceInfo; typedef DriverInitInfo* DriverReplaceInfoPtr;
typedef DriverFinalInfo DriverSupersededInfo; typedef DriverFinalInfo* DriverSupersededInfoPtr;
struct DRVRHeader {
short drvrFlags;
short drvrDelay;
short drvrEMask;
short drvrMenu;
short drvrOpen;
short drvrPrime;
short drvrCtl;
short drvrStatus;
short drvrClose;
unsigned char drvrName[1];
};
typedef struct DRVRHeader DRVRHeader;
typedef DRVRHeader * DRVRHeaderPtr;
Devices.h
struct FileBasedDriverDetailed {
FileBasedDriverRecord fileBasedDriver;
Str63 fragName;
};
typedef FileBasedDriverDetailed* FileBasedDriverDetailedPtr;
struct FileBasedDriverRecord {
FSSpec theSpec;
MacDriverType theType;
Boolean compatibleProp;
UInt8 pad[3];
};
typedef FileBasedDriverRecord* FileBasedDriverRecordPtr;
union IOCommandContents {
ParmBlkPtr pb;
DriverInitInfoPtr initialInfo;
DriverFinalInfoPtr finalInfo;
DriverReplaceInfoPtr replaceInfo;
DriverSupersededInfoPtr supersededInfo;
};
typedef struct OpaqueIOCommandID * IOCommandID;
Devices.h
typedef UInt16 UnitNumber;
Devices.hDefines the value of the caller parameter
to a Chooser device package.
enum {
chooserID = 1
};
Define values of the message parameter
to a Chooser device package.
enum {
chooserInitMsg = 11,
newSelMsg = 12,
fillListMsg = 13,
getSelMsg = 14,
selectMsg = 15,
deselectMsg = 16,
terminateMsg = 17,
buttonMsg = 19
};
chooserInitMsgThe user selected this device package.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
newSelMsgThe user made new device selections.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
fillListMsgFill the device list with choices.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
getSelMsgMark one or more choices as selected.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
selectMsgThe user made a selection.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
deselectMsgThe user canceled a selection.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
terminateMsgAllows device package to clean up.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
buttonMsgThe user selected a button.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
enum {
dNeedLockMask = 0x4000,
dNeedTimeMask = 0x2000,
dNeedGoodByeMask = 0x1000,
dStatEnableMask = 0x0800,
dCtlEnableMask = 0x0400,
dWritEnableMask = 0x0200,
dReadEnableMask = 0x0100
};
dNeedLockMaskSet if driver must be locked in memory as soon as it is opened.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dNeedTimeMaskSet if driver needs time for performing periodic tasks.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dNeedGoodByeMaskSet if driver needs to be called before the application heap is initialized.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dStatEnableMaskSet if driver responds to status requests.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dCtlEnableMaskSet if driver responds to control requests.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dWritEnableMaskSet if driver responds to write requests.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dReadEnableMaskSet if driver responds to read requests.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
Define flags used in the driver header and device control entry.
enum {
dReadEnable = 0,
dWritEnable = 1,
dCtlEnable = 2,
dStatEnable = 3,
dNeedGoodBye = 4,
dNeedTime = 5,
dNeedLock = 6
};
dReadEnableSet if driver responds to read requests.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dWritEnableSet if driver responds to write requests.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dCtlEnableSet if driver responds to control requests.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dStatEnableSet if driver responds to status requests.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dNeedGoodByeSet if driver needs time for performing periodic tasks.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dNeedTimeSet if driver needs time for performing periodic tasks.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dNeedLockSet if driver must be locked in memory as soon as it is opened.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
Define run-time flags used in the device control entry.
enum {
dVMImmuneBit = 0,
dOpened = 5,
dRAMBased = 6,
drvrActive = 7
};
dVMImmuneBitDriver does not need VM protection.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dOpenedDriver is open.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dRAMBaseddCtlDriver is
a handle (1) or pointer (0).
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
drvrActiveDriver is currently processing a request.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
enum {
dVMImmuneMask = 0x0001,
dOpenedMask = 0x0020,
dRAMBasedMask = 0x0040,
drvrActiveMask = 0x0080
};
dVMImmuneMaskDriver does not need VM protection.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dOpenedMaskDriver is open.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
dRAMBasedMaskdCtlDriver is
a handle (1) or pointer (0).
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
drvrActiveMaskDriver is currently processing a request.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
Define control codes for DeskAccessories.
enum {
goodbye = -1,
killCode = 1,
accEvent = 64,
accRun = 65,
accCursor = 66,
accMenu = 67,
accUndo = 68,
accCut = 70,
accCopy = 71,
accPaste = 72,
accClear = 73
};
goodbyeHeap being reinitialized.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
killCodeKillIO requested.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
accEventHandle an event.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
accRunTime for periodic action.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
accCursorChange cursor shape.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
accMenuHandle menu item.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
accUndoHandle undo command.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
accCutHandle cut command.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
accCopyHandle copy command.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
accPasteHandle paste command.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
accClearHandle clear command.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
Define values of the message parameter
to a Monitor 'mntr'.
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
};
initMsgInitialization.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
okMsgUser clicked OK button.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
cancelMsgUser clicked Cancel button.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
hitMsgUser clicked control in Options dialog.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
nulMsgPeriodic event.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
updateMsgUpdate event.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
activateMsgNot used.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
deactivateMsgNot used.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
keyEvtMsgKeyboard event.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
superMsgShow superuser controls.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
normalMsgShow only normal controls.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
startupMsgCode has been loaded.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
enum {
ioInProgress = 1,
aRdCmd = 2,
aWrCmd = 3,
asyncTrpBit = 10,
noQueueBit = 9
};
ioInProgressPredefined value of ioResult while I/O is pending.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
aRdCmdLow byte of ioTrap for Read calls.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
aWrCmdLow byte of ioTrap for Write calls.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
asyncTrpBitTrap word modifier.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
noQueueBitTrap word modifier.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
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
kPowerManagementCommand = 13
};
kOpenCommandAvailable in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kCloseCommandAvailable in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kReadCommandAvailable in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kWriteCommandAvailable in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kControlCommandAvailable in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kStatusCommandAvailable in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kKillIOCommandAvailable in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kInitializeCommandInit driver and device.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kFinalizeCommandShutdown driver and device.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kReplaceCommandReplace an old driver.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kSupersededCommandPrepare to be replaced by a new driver.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kSuspendCommandPrepare driver to go to sleep.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kResumeCommandWake up sleeping driver.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
kPowerManagementCommandPower management command, supercedes kSuspendCommand and kResumeCommand.
Available in Mac OS X v10.0 through Mac OS X v10.4.
Declared in Devices.h
The table below shows the most common result codes returned by the Device Manager.
Last updated: 2007-07-10