ColdFusion is an automation (late-binding) COM client. This implies that the COM object has to support the IDispacth interface, and that arguments for methods and properties be standard automation types. Since ColdFusion is a typeless language, it uses the object's type information to correctly set up the arguments on call invocations. Any ambiguity in the object's data-types could lead to unexpected behavior.
It is important to use server-side COM objects in ColdFusion, that is, they should not have a graphical user interface. If you invoke an object with a graphical interface in your ColdFusion application, a window for the component might appear on the Web server desktop, not on the user's desktop. This could tie up ColdFusion server threads and result in further Web server requests not being serviced.
ColdFusion can call Inproc, Local, or remote COM objects. The attributes specified in the CFOBJECT tag determine which type of object is called.
To make use of COM components in your ColdFusion application, you need at least the following items:
Once you've acquired the object you want to use, you may need to register it with Windows in order for ColdFusion (or anything else) to find it. Some objects may be deployed with their own setup programs that register objects automatically, while others may require manual registration.
Inproc object servers (*.dll, *.ocx) can be registered manually by using the "regsvr32.exe" utility using the following form:
regsvr32 c:\path\servername.dll
Local servers (*.exe) are typically registered either by simply starting them or specifying a command line parameters like:
C:\pathname\servername.exe -register
Your COM object should provide documentation explaining each of the component's methods and the ProgID. With this information, you're ready to work with the CFOBJECT tag. If you don't have documentation, use the Object Viewer to view the component's interface.
The OLE/COM Object Viewer installation installs the executable by default as \mstools\bin\oleview.exe
. You use the Object Viewer to retrieve a COM object's Program ID as well as its methods and properties.
Once you've installed a COM object, make sure you register it using the regsvr32.exe utility. Otherwise you won't find the object in the Object Viewer. The Object Viewer retrieves all COM objects and controls from the Registry and presents the information in a simple format, sorted into groups for easy viewing.
By selecting the category and then the component, you can see the Program ID of the COM object you want to use. The Object Viewer also gives you access to options for the operation of the object.
![]() |
To view an object's properties: |