Important: The information in this document is obsolete and should not be used for new development.
ComponentSetTargetYou can use the
ComponentSetTargetfunction to call a component's target request routine (that is, the routine that handles the
kComponentTargetSelectrequest code). The target request informs a component that it has been targeted by another component.
You should not target a component instance if the component does not support the target request. Before calling this function, you should issue a can do request to the component instance you want to target to verify that the component supports the target request. If the component supports it, use the
ComponentSetTargetfunction to send a target request to the component instance you wish to target. After receiving a target request, the targeted component instance should call the component instance that targeted it whenever the targeted component instance would normally call one of its defined functions.
FUNCTION ComponentSetTarget (ci: ComponentInstance; target: ComponentInstance): LongInt;
- The component instance to which to send a target request (the component that has been targeted).
- The component instance of the component issuing the target request.
ComponentSetTargetfunction returns a function result of
badComponentSelectorif the targeted component does not support the target request. Otherwise, the
ComponentSetTargetfunction returns as its function result the value that the targeted component instance returned in response to the target request.
SEE ALSOFor details on how to handle the target request, see "Responding to the Target Request" on page 6-24.