formZ SDK | 4.0 Call Back Reference | Command | Tool

fz_tool_cbak_io_func

Description

Preference file I/O (Optional). This function is called by formZ to read and write the tools preference information when a preference file or the defaults file is read or written. The preference files use an IFF type of file format. A block is read or written for each tool which has a registered. This is useful for storing the any user settings used by a tool such as the options for a tool.

Version control is handled through the version parameter. When writing a block you should set the version variable to the variant of data that you are writing. The default is zero. It is recommended that you increment this number each time when you change the format of the data that you write to the stream. When reading the block, the version parameter contains the version which was used to write the block. You can then take the appropriate action to read the variant of data in the block.

Plugin Prototype

fzrt_error_td fz_tool_cbak_io_func(

fzrt_int

windex,

fz_iost_ptr

iost,

fz_iost_dir_td_enum

dir,

fzpl_vers_td * const

version,

fzrt_unsigned_int

size )

Parameters

windex [Input]

project window index

iost [Input]

io stream point for current stream.

dir [Input]

io direction for current stream.

version [Input, Result]

if dir == FZ_IOST_READ then this is the version of the block being read. if dir == FZ_IOST_WRITE then this is the version of the block that was written (default == 0).

size [Input]

if dir == FZ_IOST_READ then this is the size of the block being read

Returns

Error codes

Availability

5.0.0.0

See Also

fz_iost_ptr, fz_tool_cbak_pref_io

Function Set


Defined in

fz_tool_api.h