Community articleFunctionCall_SetObjectProc
Added by IBM contributorIBM on August 16, 2011
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.



Description

This function defines the services provided by a FunctionCall structure. Use this function to:
  • Define the behavior of you custom function when called from a form.
  • Implement the help provided to a developer when using your function in a compliant IBM® Forms product such as the Designer.

Function

r_short FunctionCall_SetObjectProc(
   FunctionCall *theFunctionCall,
   voidP theProcedure,
   r_long theProcID);


Parameters

Table 1. set object parameters
ExpressionTypeDescription
theFunctionCallFunctionCall*The Function Call whose procedures are to be set.
theProcedurevoidPA pointer to the implementation of the procedure.
theProcIDr_shortThis parameter defines the type of function being defined. Set to: FUNCTIONCALLEVALUATE if theProcedure contains the implementation details of your custom function. FUNCTIONCALLHELP if theProcedure contains the implementation details of your help function


Returns

OK on success or an error code on failure.

Notes

  • In any extension, FunctionCall_SetObjectProc will be called twice. Once to define the behavior of your custom function and once to provide help information about each of your custom functions in the form development environment (for example the Designer).

Example

C_ExtensionInit(Extension *theExtension, IFX *theIFXManager)
{
      /* Additional Code Removed */
      if ((theError = FunctionCall_SetObjectProc(theFunctionCall,
         (voidP)FCISimpleFunctions, FUNCTIONCALLEVALUATE)) != OK)
      {
         return theError;
      }
      
      if ((theError = FunctionCall_SetObjectProc(theFunctionCall,
         (voidP)FCISimpleHelp, FUNCTIONCALLHELP)) != OK)
      {
         return theError;
      }
      /* Additional Code Removed */
}