Developer’s Guide

Table Of Contents
12-6 Developer’s Guide
13. Click Done to close the Define Fields dialog box.
Customizing the plug-in example
The plug-in example in FileMaker Developer is designed to be easily
modified so you can add your own custom functions. You need to
modify the following:
version and function name information in FMExample.r, and
FMExample.rc
configuration function in FMPrefs.c
registry information in FMMain.h
external function definitions in FMFunct.h
external function coding in FMFunct.c
The following tables describe the modifications you must make to
the plug-in example files to create a custom external function plug-
in.
Customizing FMExample.r
resource Specify the creator string value.
kFMEX_RES_CREATOR
resource 'vers' Specify the version values.
resource 'STR#' Specify the plug-in name and description.
kFMEX_RES_STRINFOID
Modify the feature string as appropriate.
resource 'STR#' Include the names of all external functions in
kFMEX_RES_FUNCTLISTID the plug-in.
Customizing FMExample.rc
//Version Modify the version variables as appropriate.
//Dialog Specify a custom caption for the dialog.
//Icon Change icon location variable to point to your
icon.
//String Table• Edit the String Table strings as appropriate,
including the plug-in name, the Feature
String,and the list of function names in the
plug-in. See “Required resource files” on
page 12-7, and “Feature string syntax” on
page 12-8,
Customizing FMPrefs.c
Do_PluginPrefs• Add your configuration code to the
Do_PluginPrefs function.
Customizing FMMain.h
#define Place your preferences in the registry under
k_Pref_Registry_Path_Value• your own software company or product
name.
Customizing FMFunct..h
kVersionLength Set value to equal the length of kVersionString.
kVersionString Specify the plug-in name and version.
Function declarations• Include your function declaration statements as
appropriate.
Customizing FMFunct.c
Do_ExternalFunction• Modify the case statements to call your functions, as
appropriate. The first function in the function list of
the resource file is numbered 0.
Function Statements• Add your function code following the
Do_ExternalFunction function.
The PluginVersion function is required for all plug-
ins. Do not delete this function.