Macro Components

5/10/2007

A macro component is a component that has dependencies upon other components and has no file or registry resources of its own. Macro components are useful for bundling components that must appear together in a configuration, or for bundling functionality that will be used again. Instead of adding the individual components to the configuration, you create a macro component that has dependencies on all of them and then you add the single macro component to the configuration.

Numerous macro components are available in the database, and custom macro components can be created using Component Designer. Like other components, macro components have core and extended properties and can belong to groups. Macro components can utilize a special prototype called the Selector Prototype Component. This displays their constituent components with checkboxes in Target Designer, and allows the run-time author to exclude individual components from the configuration before the first dependency check is run. Macro components are always displayed in bold in the development tools for easy recognition.

Macro Components and Dependency Groups

Like dependency groups, macro components provide a way to add components as a set to a configuration. However, macro components and dependency groups differ in the way they themselves are included in configurations. A macro component can be added to a configuration like any other component. A dependency group can be added to a configuration only when a component that is dependent upon it is added to the configuration.

In addition, a macro component declares its own members while a dependency group does not. Dependency group membership is declared by the members themselves. This means that a macro component controls an exact dependency list, but the members of a dependency group can change. Also, if you want existing components to be added as a set to a configuration, creating a macro component that is dependent upon them is simpler than creating a dependency group. If you create a dependency group, you have to revise each component to declare membership in the group and create a component that is dependent upon the group.

Predefined Macro Components

Two types of predefined macro components are provided in the component database: Windows technology macro components and design templates.

Windows technology macro components provide baseline technology, such as support for networks. They are displayed in Target Designer under appropriate nodes under the Software node of the component browser tree. For more information, see Windows Technology Macro Components.

Design templates are built from technology macro components and provide special-purpose technology such as all of the features required to build a gaming console. These are displayed in Target Designer under the Design Templates node of the component browser tree. For more information, see Design Templates.

See Also

Concepts

Resources (Update Rollup 1.0 for Windows XP Embedded)
Prototype Components

Other Resources

Component Types
Using Macro Components
Dependencies
Groups