formZ SDK | 5.0 API Reference | System | Plugin Manager (FZPL)

fzpl_plugin_entry_func

Description

This is the prototype for a plugin's entry point. The symbol name for this function can vary from application to application. Currently, for all formZ applications this symbol name is fz_plugin_entry.


This function will be called with cmd set to one of the following:
FZPL_PLUGIN_INITIALIZE:
At this point, the plugin file should check if its plugins can run in the environment described by hostConfig. If the plugins are licensed, licensing should be checked. The plugin file should check the availability of all host application implemented function sets. If for any reason, none of the plugins can run, an appropriate error with an error severity of FZRT_ERROR_SEVERITY_ERROR should be returned. In this case, formZ will unload the plugin file. If only some of the plugins can not run an appropriate error with an error severity of FZRT_ERROR_SEVERITY_WARNING should be returned. The plugin file will remain loaded. The plugin file will register its plugins by calling fzpl_plugin_register. If the registration is successful ( fzpl_plugin_register returns FZRT_NOERR), the plugin can allocate any memory for global data it needs and perform any other one time initialization.
FZPL_PLUGIN_EXIT:
The host application is about to exit and the plugin is about to be unloaded. The plugin should call , free up any allocated memory, and perform any uninitialization tasks.

Plugin Prototype

fzrt_error_td fzpl_plugin_entry_func(

const fzpl_fset_glue_fset * const

fsg,

fzpl_command_td

cmd,

const fzpl_host_config_td * const

hostConfig )

Parameters

fsg [Input]

the function set factory

cmd [Input]

the entry point command

hostConfig [Input]

information about the host application

Returns

FZRT_NOERR if the plugin can run.
Otherwise an appropriate error code.

Availability

5.0.0.0

Defined in

fzpl_plugin.h