The System.Runtime.InteropServices
namespace in the .NET framework class library contains interoperability services that allow .NET-managed code to interoperate with COM components. Specifically, a .NET managed client can call methods on a COM interface through a Runtime Callable Wrapper (RCW). Likewise, a COM client can call methods on a managed interface through a COM Callable Wrapper (CCW). Since the interceptor component of the adapter is just a COM interface, a managed client can call methods on the interceptor through an RCW. Likewise, since the service component of the adapter is just a COM client, it can call methods on any managed interface through a CCW.
The 5.3 version of the adapter supports all data types for .NET interoperability with .NET framework 1.1. If you are developing a .NET component or a .NET client to be used with TIBCO Adapter for COM for interoperation, you must take care of the following:
Register for COM Interop
option should be set to true
for the .NET components project configuration properties. Any managed component that you develop on your own and that you want to use in conjunction with the adapter must be registered for COM interoperability. TypeLib
key (under the classid key) to the registry. For successful .NET, COM and adapter interoperability, the TypeLib
key must be added to the registry. To do this, a custom method marked with the <ComRegisterFunction>
attribute can be added to the .NET class. The .Net class adds the TypeLib
key when Visual Studio .NET registers the COM coclass. If the project is created in VB.NET, the TypeLib key is automatically generated in the AssemblyInfo file. This TypeLib key has to be used in the COM register function. To remove the TypeLib key from the registry, a custom method marked with the <ComUnregisterFunction>
can be added to the .NET class. The .NET class removes the TypeLib key when Visual Studio .NET unregisters the coclass.<GuidAttribute>
attribute. Also, for the coClasses, the <ClassInterface(ClassInterfaceType.None)>
attribute should be specified. This prevents the language compiler from generating the class interface. This is necessary since the adapter requires the interface implemented by the coclass to be the <default>
interface.Marshal.BindToMoniker()
method available in the System.Runtime.InteropServices
namespace to conform to the moniker-based activation required for the adapter.
TIBCO Adapter™ for COM User’s Guide Software Release 5.3, September 2005 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |