Plug your own code into TPF/GI with Plug-in Tools API
Because all of its customers develop and test applications differently, and because
customer needs change and grow, TPF Software provides the Plug-In Tools API. The Plug-In Tools API
allows programmers for TPF shops to plug their own code into TPF/GI.
What a Plug-In Tool Is
To a great extent, plug-in tools appear to become part of TPF/GI: they are allowed to
create TPF/GI menu items and tool buttons, they are notified of TPF/GI program events, and they can summon
TPF/GI windows to appear. Plug-in tools can also create windows of their own.
To create a plug-in tool, programmers use a PC programming environment to write a
dynamic link library (DLL). The name of the DLL is then placed in a text file. When TPF/GI starts up, it reads
the text file and loads all the DLLs listed there.
DLLs can invoke host execs; working together, DLLs and execs can do
almost anything.
Using the Plug-In Tools API
After TPF/GI loads a DLL, it passes the address of the Plug-In API to the DLL. The
Plug-In API is a structure that contains a series of pointers to TPF/GI functions. DLLs can call these functions
to upload and download files, lock Source View control files, convert buffers between EBCDIC and ASCII, find out
the currently active system and CPC, and to do many other things.
The most important API function is the one that allows DLLs to invoke host execs. When
the DLL invokes the exec through TPF/GI, the exec runs on the host and passes back information to the DLL on the
PC. By writing DLLs and execs that work together, programmers and administrators can accomplish almost anything
they want. They can make the entire library system available through TPF/GI, for instance. Or they can
automate common tasks, such as loading several programs and locking the control files when one button is
clicked.
Development Tools
Plug-in tools can be written in any programming language that can produce a DLL, although
the most commonly used development environments for writing plug-in tools are Visual C++ and Borland Delphi.
Programmers who are interested in writing plug-in tools can obtain the necessary Visual
C++ header files or Delphi units from the TPFHub web site. Support files for other capable development
environments will be created when the need arises.
Documentation, example programs, and a Powerpoint presentation are also available
for download.
For more information, please visit www.tpf-software.com and click the TPFHub icon.
|