Important: The information in this document is obsolete and should not be used for new development.
CallComponentFunctionfunction invokes a specified function of your component with the parameters originally provided by the application that called
your component. You pass these parameters by specifying the same component parameters record passed to your component's main entry point.
FUNCTION CallComponentFunction (params: ComponentParameters; func: ComponentFunction): LongInt;
- The component parameters record that your component received from the Component Manager.
- The address of the function that is to handle the request. The Component Manager calls the routine referred to by the
funcparameter as a Pascal function with the parameters that were originally provided by the application. The routine referred to by this parameter must return a function result of type
ComponentResult(a long integer) indicating the success or failure of the operation.
CallComponentFunctionreturns the value that is returned by the routine referred to by the
funcparameter. Your component should use this value to set the current error for this connection.
SPECIAL CONSIDERATIONSIf your component subroutine does not need global data, your component should use
CallComponentFunction. If your component subroutine requires memory in which to store global data for the component, your component must use
CallComponentFunctionWithStorage, which is described next.
SEE ALSOFor an example that uses
CallComponentFunction, see Listing 6-5 on page 6-16. You can use the
SetComponentInstanceErrorprocedure, described on page 6-67, to set the current error.