This documentation is archived and is not being maintained.

COM Interoperability for Devices 

The .NET Compact Framework supports Runtime Callable Wrappers (also called "Interop Assemblies") for COM objects. This feature includes the marshaling of complex types. COM Interop for devices is based on the desktop implementation. As such, components must be registered on the desktop.

Supported Scenarios

The following scenarios are supported for device projects in Visual Studio 2005:

  • You can add an existing COM component as a reference to a managed project. This action creates an interop assembly and automatically adds the assembly as a reference. You can then use the interop assembly just as you could any managed assembly, and the properties, methods, and events of the object are available for Intellisense and in the Object Browser. Legal file types to add are DLL, EXE, and TLB.

  • You can create a native project to generate a COM component, and then create a managed project in the same solution to consume the COM component. The process is the same as for the desktop:

    • Set the native project to generate TLB output.

    • Compile the native project to generate a DLL.

    • In the managed project, add a reference to the DLL. This action generates the interop assembly.

Unsupported Scenarios

The following scenarios are not supported in Visual Studio 2005:

  • Referencing an existing ActiveX COM component from within a managed project

  • COM objects with non-system child components

  • COM objects referenced as business objects from within the DataSource Wizard.

See Also