Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 8 - Control Panels / Control Panels Reference
Resources


The Machine Resource

You can identify to the Finder the hardware and software components on which your control panel runs, or you can signal the Finder to call your control device function to perform this check. In either case, create a machine resource of type 'mach'. A machine resource must have a resource ID of -4064.

The machine resource consists of two word-sized masks: a hard and a soft mask.
Figure 8-16 shows the structure of a compiled machine resource.

Figure 8-16 Structure of a compiled machine ('mach') resource

A compiled version of a machine resource contains these elements:

The Finder performs the check if you set these masks to values representing the requirements for your control panel.

Note
In System 6, the Control Panel does not display the icon for a control panel file if the machine resource indicates that the control panel cannot run on the current system.
If you set these masks to values indicating that the Finder is to call your control device function to perform the check, the Finder calls your function for the first time with a macDev message. (See "Determining If a Control Panel Can Run on the Current System" on page 8-29 for a discussion of how to handle a macDev message.)

Table 8-5 shows the values you use to set the machine resource masks.
Possible settings for the machine resource masks
Soft mask Hard maskAction
$0000$FFFFThe Finder calls this control device function with a macDev message, and the function must perform its own hardware and software requirements check.
$3FFF$0000This control panel runs on Macintosh II systems only.
$7FFF$0400This control panel runs on all systems with an Apple Desktop Bus (ADB).
$FFFF$0000This control panel runs on all systems.

For more information about the machine resource, see "Specifying the Machine Resource" on page 8-20.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996