Important: The information in this document is obsolete and should not be used for new development.
FindNextComponentfunction returns the component identifier for the next registered component that meets the selection criteria specified by your application. You specify the selection criteria in a component description record.
Your application can use the component identifier returned by this function to get more information about the component or to open the component.
FUNCTION FindNextComponent (aComponent: Component; looking: ComponentDescription) : Component;
- The starting point for the search. Set this field to 0 to to start the search at the beginning of the component list. If you are continuing a search, you can specify a component identifier previously returned by the
FindNextComponentfunction. The function then searches the remaining components.
- 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, all components meet the search criteria. In this case, your application can retrieve information about all of the components that are registered in the system by repeatedly calling
GetComponentInfountil the search is complete. Similarly, if you set all fields to 0 except for the
componentManufacturerfield, the Component Manager searches all registered components for a component supplied by the manufacturer you specify. Note that the
FindNextComponentfunction does not modify the contents of the component description record you supply. To retrieve detailed information about a component, you need to use the
GetComponentInfofunction to get the component description record for each returned component.
FindNextComponentfunction returns the component identifier of a component that meets the search criteria.
FindNextComponentreturns a function result of 0 when there are no more matching components.
SEE ALSOUse the
GetComponentInfofunction, described on page 6-45, to retrieve more information about a component. To open a component, use the
OpenComponentfunction, described on page 6-42 and page 6-44, respectively. See page 6-36 for information on the component description record.
See Listing 6-1 on page 6-8 for an example of searching for a specific component.