
262
Chapter 12: Building Custom CFXAPI Tags
Compiling C++ CFX tags
CFX tags built in Windows and on UNIX must be thread-safe. Compile CFX tags for Solaris
with the
-mt
switch on the Sun compiler.
Locating your C++ library files on UNIX
On UNIX systems, your C++ library files can be in any directory as long as the directory is
included in LD_LIBRARY_PATH or SHLIB_PATH (HP-UX only).
Implementing C++ CFX tags
CFX tags built in C++ use the tag request object, represented by the C++
CCFXRequest class
.
This object represents a request made from an application page to a custom tag. A pointer to an
instance of a request object is passed to the main procedure of a custom tag. The methods
available from the request object let the custom tag accomplish its work. For information about
the CFX API classes and members, see
Chapter 4, “ColdFusion C++ CFX Reference,”
in
CFML
Reference
.
Debugging C++ CFX tags
After you configure a debugging session, you can run your custom tag from within the debugger,
set breakpoints, single-step, and so on.
Debugging on Windows
You can debug custom tags within the Visual C++ environment.
To debug C++ CFX tags in Windows:
1
Build your C++ CFX tag using the debug option.
2
Restart ColdFusion.
3
Start Visual C++ 6.0.
4
Select
Build > Start Debug > AttachProcess
.
5
Select jrunsvc.exe.
Macromedia recommends that you shut down all other Java programs.
6
Execute any ColdFusion page that calls the CFX tag.
7
Select
File > Open
to open a file in VisualDev in which to set a breakpoint.
8
Set a breakpoint in the CFX project.
The best place is to put it in
ProcessRequest()
. Next time you execute the page you will hit
the breakpoint.
Summary of Contents for COLDFUSION MX 61-DEVELOPING COLDFUSION MX
Page 1: ...Developing ColdFusion MX Applications...
Page 22: ...22 Contents...
Page 38: ......
Page 52: ...52 Chapter 2 Elements of CFML...
Page 162: ......
Page 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Page 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Page 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Page 266: ......
Page 314: ...314 Chapter 14 Handling Errors...
Page 344: ...344 Chapter 15 Using Persistent Data and Locking...
Page 349: ...About user security 349...
Page 357: ...Security scenarios 357...
Page 370: ...370 Chapter 16 Securing Applications...
Page 388: ...388 Chapter 17 Developing Globalized Applications...
Page 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Page 410: ......
Page 426: ...426 Chapter 19 Introduction to Databases and SQL...
Page 476: ...476 Chapter 22 Using Query of Queries...
Page 534: ...534 Chapter 24 Building a Search Interface...
Page 556: ...556 Chapter 25 Using Verity Search Expressions...
Page 558: ......
Page 582: ...582 Chapter 26 Retrieving and Formatting Data...
Page 668: ......
Page 734: ...734 Chapter 32 Using Web Services...
Page 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Page 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Page 788: ......