User Guide

Table Of Contents
Creating and using COM objects 955
Understanding common COM-related error messages
The following table described some error messages you might encounter when using COM
objects:
Accessing Complex COM Objects using Java proxies
ColdFusion MX supports Java proxies to access COM objects. If you do not create Java proxies in
advance, ColdFusion must dynamically discover the COM interface. This technique can have
two disadvantages:
Dynamic discovery takes time and can reduce server performance with frequently used
complex COM objects.
Dynamic discovery uses the IDispatcher interface to determine the COM object features, and
might not handle some complex COM interfaces.
To overcome these problems, ColdFusion MX includes a utility, com2java.exe, that creates static
Java stub proxy classes for COM objects. ColdFusion can use these Java stubs to access COM
objects more efficiently than when it creates the proxies dynamically. Additionally, the
com2java.exe utility can create stubs for features that the dynamic proxy generator might miss.
ColdFusion MX ships with pregenerated stubs for the Windows XP, Windows 2000, and
Windows 97 editions of Microsoft Excel, Microsoft Word, and Microsoft Access.
ColdFusion MX is configured to automatically use these stubs.
If you create Java stub files for a COM object, you continue to use the
cfobject tag with a type
attribute value of
COM, or the CreateObject function with a first argument of COM, and you access
the object properties and methods as you normally do for COM objects in ColdFusion.
Use the following steps to use the com2java.exe utility. This procedure uses Microsoft Outlook as
an example.
Error Cause
Error Diagnostic Information
Error trying to create object specified in the tag.
COM error 0x800401F3. Invalid class string.
The COM object is not registered or does not
exist.
Error Diagnostic Information
Error trying to create object specified in the tag.
COM error 0x80040154. Class not registered.
The COM object is not registered or does not
exist. This error usually occurs when an object
existed previously, but was uninstalled.
Error Diagnostic Information
Failed attempting to find "SOMEMETHOD"
property/method on the object COM error
0x80020006.
Unknown name.
The COM object was instantiated correctly, but
the method you specified does not exist.