.NET Interoperability Limitations

ColdFusion .NET interoperability has the following limitations

  • You cannot invoke methods with pointers as arguments or the return type.

  • You cannot invoke methods that take Out parameters.

  • ColdFusion can only convert from System.Data.DataTable, System.Collection.Hashtable and System.Collection.ArrayList to ColdFusion data types. ColdFusion cannot convert from ColdFusion queries, structures, and arrays to these System data types; however, it can convert from ColdFusion arrays to the CLR array type. Therefore, you cannot pass structures or queries directly to .NET methods.

  • You cannot access .NET user interface components.

  • You cannot use callbacks (events and Delegates) from .NET side.

  • ColdFusion cannot determine the correct data type conversion if a method has multiple signatures that have the same number of parameters and differ only in the parameter data types. In this case, use the JavaCast method to convert the ColdFusion data to the Java type that corresponds to the .NET type.

  • If the JavaCast function cannot eliminate ambiguity between functions with the same number of parameters because a single Java type corresponds to multiple .NET types, ColdFusion creates a single proxy that uses the .NET data type that corresponds directly to a Java type.

    For more information on how to ambiguous handle type conversions, see Converting between .NET and ColdFusion data types.

  • Assemblies registered in the DotNetSide.exe.config file must have unique class names. If two or more assemblies have the same class name, method invocation can result in an error or can give the wrong result. For example, do not have two DLLs, a.dll and b.dll, that contain the same class name, nam1.name2.MyClass. If you use one DLL and later want to use another DLL that contains a class that clashes with first, restart the ColdFusion .NET Service if ColdFusion and .NET both are on the same machine. If they are on the different machines, remove the entry for the first DLL from the DotNetSide.exe.config file and restart the ColdFusion .NET Service on the Windows machine hosting the .NET service.