Developer’s Guide

Table Of Contents
64 FileMaker Developer’s Guide
Customizing FMPluginExample.cpp
Make your modifications to the FMPluginExample.cpp in the
functions listed in the following table.
Customizing FMPluginPrefs.cpp
This file contains the Do_PluginPrefs function for the implementa-
tion of the configuration dialog box. Revise or remove this code as
needed.
Customizing FMPluginFunctions.cpp
Revise or remove the functions provided in the
FMPluginFunctions.cpp file and define your own. Do_PluginInit
refers to these functions when evaluating external functions in
calculations.
Requirements for writing external
function plug-ins
FileMaker plug-ins are most useful when they contain a single
function or a set of functions with similar features. When you design
your plug-in, keep in mind that developers who use your plug-in may
not understand programming conventions that you take for granted.
The format of each function’s parameter should be understandable to
the typical user.
API code files
There are ten API code files in the Headers folder: FMXExtern.h,
FMXCalcEngine.h, FMXBinaryData.h, FMXDateTime.h,
FMXTextStyle.h FMXTypes.h, FMXFixPt.h, FMXClient.h,
FMXText.h, and FMXData.h. The files are not redistributable in
source code (or human readable) form, cannot be modified, and are
only provided to enable licensees of FileMaker
Developer to
compile plug-ins for use with FileMaker products. Not all the files
are required to build all types of plug-ins.
The FMXExtern.h is absolutely required. The FMXExtern.h defines
the parameter block (the shared data structure used by your plug-in
and FileMaker
Pro, FileMaker Developer, or FileMaker Server) and
some shared function calls. The function calls are used to manipulate
the parameter and result handles in the parameter block.
The FMXExtern.h file defines the call-back functions for backward
compatibility operations and the different kinds of plug-in events
(FileMaker
Pro, FileMaker Developer, or FileMaker Server
messages) sent to the plug-in in a FMExternCallSwitch definition.
Function name Customization
Do_PluginInit Provide your own unique plugin ID for “pluginID.”
Register each function, providing its name,
description, and function to be used. Call
fmx::ExprEnv::RegisterExternalFunction to
register your functions.
Do_PluginIdle Add any idle processing your plug-in needs.
Do_PluginShutdown Revise the UnRegisterExternalFunction calls to
reverse the registration done in Do_PlugInit. Call
fmx::ExprEnv::UnRegisterExternalFunction to
unregister your functions.