Getting Started with COM/DCOMColdFusion is an automation (late-binding) COM client. As a result, the COM object must support the IDispatch interface, and arguments for methods and properties must be standard automation types. Because 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 can lead to unexpected behavior. In ColdFusion, you should only use server-side COM objects, which do not have a graphical user interface. If your ColdFusion application invokes an object with a graphical interface in a window, the component might appear on the Web server desktop, not on the user's desktop. This can take 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 Requirements for COMTo make use of COM components in your ColdFusion application, you need at least the following items:
Registering the objectafter you acquire the object you want to use, you must register it with Windows in order for ColdFusion (or any other program) to find it. Some objects might be deployed with their own setup programs that register objects automatically, while others might require manual registration. You can register Inproc object servers (*.dll, *.ocx) manually by running the regsvr32.exe utility using the following form: regsvr32 c:\path\servername.dll You typically register local servers (*.exe) either by starting them or specifying a command line parameters, such as the following: C:\pathname\servername.exe -register Finding the component ProgID and methods
Your COM object should provide documentation explaining each of the component's methods and the ProgID. With this information, you are ready to use the Using the OLE/COM Object ViewerThe 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. After have install a COM object, make sure you register it using the regsvr32.exe utility. Otherwise, you cannot 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:
|