The Component Object Model (COM) is a Microsoft-sponsored specification for creating distributed software components. There are a large number of third-party COM objects, most of which can be used by ColdFusion. COM is supported only in the Windows version of ColdFusion.
cfobject tag can call COM objects located on the
same machine as the ColdFusion server or on other machines connected
to the network.
cfobject can also communicate with
objects residing anywhere on the network using Distributed COM (or
DCOM). In order to connect to a COM object using ColdFusion, the
object must first be registered. You register a COM object using the
regsvr32 command from the Windows command line,
C:\> regsvr32 myobject.dll
Once a COM object is registered, you can connect to it using
ColdFusion. To understand how to use the
tag to communicate with a COM object, you first need to understand
the tag’s syntax:
<cfobject type="COM" name="
When connecting to a COM object, the
attribute must always be set to
name attribute is required and specifies a name
for the object to be used when referencing the
object’s attributes and methods in your code.
class is a required attribute and specifies the program ID for the object you want to invoke. If you don’t know the program ID for your object, consult the object’s documentation. You can also use Microsoft’s OLEView program to ...