BackUp LevelNext

Building Extensions in C++

Another technology supported for extending ColdFusion is C++. ColdFusion exposes a C++ based API you can employ for encapsulating specific features in a ColdFusion tag, generally known as a CFX tag. The ColdFusion Application Programming Interface (CFAPI) is a C++ based API for creating C++ based tags for use in ColdFusion. These custom tags implemented as DLLs and have the following capabilities:

On Windows NT, you can get started quickly by using the ColdFusion Custom Tag Visual C++ AppWizard to generate a tag. The custom tag wizard is automatically installed during setup if Visual C++ 4.0 or higher is present on your system. By modifying the default tag implementation and experimenting, you will quickly learn how to use the API.

Before you can use your C++ compiler to build custom tags, you must enable the compiler to locate the CFAPI header file, cfx.h. On Windows NT, you do this by adding the CFAPI Include directory (\cfusion\cfapi\include) to your list of global include paths. On Solaris, you will need -I <includepath> on your compile line (see the Makefile directory list example).

Solaris only

CFX tags built on Solaris must be thread safe and should be compiled with the -mt switch on the Sun compiler.

Sample C++ tags

Two CFX tags are included to give you additional insight into working with the CFAPI. The two example tags are:

On Windows NT, these tags are located in the \cfusion\cfxapi\examples directory. On Solaris, look in installdirectory/coldfusion/cfx/examples.


BackUp LevelNext

allaire

AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.