Important: The information in this document is obsolete and should not be used for new development.
ComponentSetTarget
You can use theComponentSetTarget
function to call a component's target request routine (that is, the routine that handles thekComponentTargetSelect
request 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
ComponentSetTarget
function 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;
ci
- The component instance to which to send a target request (the component that has been targeted).
target
- The component instance of the component issuing the target request.
DESCRIPTION
TheComponentSetTarget
function returns a function result ofbadComponentSelector
if the targeted component does not support the target request. Otherwise, theComponentSetTarget
function returns as its function result the value that the targeted component instance returned in response to the target request.SEE ALSO
For details on how to handle the target request, see "Responding to the Target Request" on page 6-24.