Getting started with COM and DCOM
765
COM Requirements
To use COM components in your ColdFusion application, you need at least the following items:
•
The COM objects (typically DLL or EXE files) that you want to use in your ColdFusion
application pages. These components should allow late binding; that is, they should
implement the IDispatch interface.
•
Microsoft OLE/COM Object Viewer, available from Microsoft at
www.microsoft.com/com/resources/oleview.asp
. This tool lets you view registered COM
objects.
Object Viewer lets you view an object's class information so that you can properly define the
class
attribute for the
cfobject
tag. It also displays the object’s supported interfaces, so you
can discover the properties and methods (for the IDispatch interface) of the object.
Registering the object
After you acquire an object, you must register it with Windows for ColdFusion (or any other
program) to find it. Some objects have setup programs that register objects automatically, while
others require manual registration.
You can register Inproc object servers (.dll or .ocx files) manually by running the regsvr32.exe
utility using the following form:
regsvr32 c:\path\servername.dll
You typically register Local servers (.exe files) either by starting them or by specifying a command
line parameters, such as the following:
C:\pathname\servername.exe -register
Finding the component ProgID and methods
Your COM object supplier should provide documentation that explains each of the component's
methods and the ProgID. If you do not have documentation, use either the ColdFusion
cfdump
tag or the OLE/COM Object Viewer to view the component's interface.
Using the cfdump tag to view COM object interfaces
Effective with ColdFusion MX 6.1, the ColdFusion
cfdump
tag displays the following
information about a COM object:
•
Public methods
•
Put properties
•
Get properties
The method and property information includes the parameter or property types and whether they
are in, out, optional, or retval values. The
cfdump
tag output does not include the object’s
ProgID.
Note:
The dump header indicates the ColdFusion object class, which is
coldfusion.runtime.com.ComProxy, and the COM object CLSID.
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: ......