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 6 - Component Manager / Component Manager Reference
Routines for Applications / Finding Components


CountComponents

Your application can use the CountComponents function to determine the number of registered components that meet your selection criteria. You specify the selection criteria in a component description record. The CountComponents function returns the number of components that meet those search criteria.

FUNCTION CountComponents (looking: ComponentDescription): LongInt;
looking
A component description record. Your application specifies the criteria for the component search in the fields of this record.
The Component Manager ignores fields in the component description record that are set to 0. For example, if you set all the fields to 0, the Component Manager returns the number of components registered in the system. Similarly, if you set all fields to 0 except for the componentManufacturer field, the Component Manager returns the number of registered components supplied by the manufacturer you specify.
DESCRIPTION
The CountComponents function returns a long integer containing the number of components that meet the specified search criteria.

SEE ALSO
See page 6-36 for information on the component description record.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996