Important: The information in this document is obsolete and should not be used for new development.
FindNextComponent
TheFindNextComponent
function 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;
aComponent
- 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
FindNextComponent
function. The function then searches the remaining components.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, 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
FindNextComponent
andGetComponentInfo
until the search is complete. Similarly, if you set all fields to 0 except for thecomponentManufacturer
field, the Component Manager searches all registered components for a component supplied by the manufacturer you specify. Note that theFindNextComponent
function does not modify the contents of the component description record you supply. To retrieve detailed information about a component, you need to use theGetComponentInfo
function to get the component description record for each returned component.DESCRIPTION
TheFindNextComponent
function returns the component identifier of a component that meets the search criteria.FindNextComponent
returns a function result of 0 when there are no more matching components.SEE ALSO
Use theGetComponentInfo
function, described on page 6-45, to retrieve more information about a component. To open a component, use theOpenDefaultComponent
orOpenComponent
function, 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.