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

fzpl_fset_acquire

Description

Acquires a function set. This function fills a pre allocated function set. It provides runtime type and version checking. It also bumps the function set's reference count so any plugin implementing the function set won't be unloaded. Function pointers for any unimplemented functions will be NULL.

Plugin Prototype

fzrt_error_td fzpl_fset_acquire(

const fzrt_UUID_td

funcset_id,

fzpl_vers_td

funcset_version,

const fzrt_UUID_td

pluginId,

const char *

fset_typestr,

fzrt_unsigned_int

fset_size,

fzpl_fset_td * const

fset )

Parameters

funcset_id [Input]

The UUID of the function set.

funcset_version [Input]

The version of the function set. Use the version in the appropriate header file or FZPL_VERS_ANY.

pluginId [Input]

The UUID of the plugin which implements the function set. Use FZRT_UUID_NULL if don't care or formZ implementation.

fset_typestr [Input]

The type string of the struct to be filled with function set function pointers. Use FZPL_TYPE_STRING().

fset_size [Input]

The size of the struct to be filled with function set function pointers. Use sizeof().

fset [Result]

A pointer to the struct containing the function pointers. This struct must have fzpl_fset_prvt_data_td prvt_data; as its first member. Will need to cast it to ( fzpl_fset_td *).

Returns

FZRT_NOERR on success.
FZRT_BAD_PARAM_ERROR - A parameter is NULL or out of range.
FZPL_BAD_SIZE_ERROR - fset_size does not match the size of the fset registered with the plugin manager.
FZPL_BAD_VERSION_ERROR - The requested version of the function set is not available.
FZPL_BAD_TYPE_ERROR - fset_typestr does not match the type string of the fset registered with the plugin manager.
FZRT_NO_MATCH_ERROR - The requested function set type is not available.
FZPL_INVALID_PLUGIN_ERROR - The plugin identified by pluginId is not loaded.

Availability

5.0.0.0

See Also

fzpl_fset_td, fzpl_fset_release

Function Set

fzpl_fset_glue_fset


Defined in

fzpl_plugin.h