Community articleCreating a New FunctionCall Structure
Added by IBM contributorIBM on May 6, 2011
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

C_ExtensionInit will have to create a FunctionCall structure that contains your custom-built functions.
  1. Declare a pointer to a new FunctionCall structure before you create it in theC_ExtensionInit function. Also, declare any additional variables that you will need in C_ExtensionInit.
  2. FunctionCall *theFunctionCall;
    r_short theError;
    IFXCriteriaMatchingHandler   *returnPtr;

  3. Create a new FunctionCall structure inside C_ExtensionInit by calling the function, IFSObject_AllocateObject. A generic IFSObject will be created and a generic IFSObject pointer will be returned. Cast the returned pointer to a FunctionCall pointer.
    • In the following example, C_ExtensionInit creates a new FunctionCall structure by calling the IFSObject_AllocateObject function. The pointer returned from the call to IFSObject_AllocateObject is cast to a pointer to a FunctionCall structure.
    •       if ((theFunctionCall = (FunctionCall*)IFSObject_AllocateObject(
            == NULL)

Parent topic: Setting up the Extension Initialization function