5.1.1.4.2 Initiating Function
The initiating function is invoked after all the implemented interfaces in the plug-in shared library are determined. You can initialize data structures and set up global environments that can be used by the plug-ins.
Returning a 0
value indicates the initiating
function has executed successfully. Returning a value other than
0
indicates initiation has failed. If plug-in
interface initiation fails, the GWWS server will not start.
The initiating function uses the following syntax:
int _ws_pi_init_@ID@_@Name@(char * params, void **priv_ptr);
@ID@
indicates the actual plug-in ID value. @Name@
indicates the actual plug-in name value. For example, the initiating function of a plug-in with P_CUSTOM_TYPE
as a plug-in ID and MyType
as a plug-in name is: _ws_pi_init_P_CUSTOM_TYPE_MyType (char * params, void **priv_ptr)
.Parent topic: Plug-In Register Functions