Community articleCreating C_ExtensionInit
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

The API will initialize an extension by calling the function C_ExtensionInit and passing it a pointer to the extension and a pointer to the IFX Manager.
Set up the C_ExtensionInit function within your C source file.
  • C_ExtensionInit is responsible for the registration of all the services that the extension provides.
  • In the following example the C_ExtensionInit function for fciExtension.c is declared and passed two pointers and
  • is the current extension you are initializing.
  • is the IFX Manager structure. Through this structure all other objects and services can be reached.
  • #ifndef OLD_STYLE_PARAMS
    PRE_FUNCTION_DECL r_short POST_FUNCTION_DECL C_ExtensionInit(
          Extension *theExtension, IFX *theIFXManager)
    #else
    PRE_FUNCTION_DECL r_short POST_FUNCTION_DECL C_ExtensionInit(
          theExtension, theIFXManager)
    Extension *theExtension;
    IFX *theIFXManager;
    #endif
    {
          /* Additional code removed */
    }