"pi**********@gmail.com" <pi**********@gmail.com> wrote:
Hi All,
The company I work for has traditionally used COM/ActiveX for the
solutions that it provides. We are in the process of moving to .NET and
a few applications have been written in VB.NET up to this point.
Some of the applications are class libraries which need to be callable
via the COM interface from some of the older applications. Could
someone please explain to me the issues involved in deploying such a
class library?
On the developer machines it is easy to /deploy/ since you just mark
the project as "Register for COM interop", but what is the equivelant
of this process on a client's machine?
You can assume that we will deploy the .NET runtime.
Friendly Regards
Pieter Breed
To make .NET assemblies available to applications that use
COM you need to use this:
NET Framework Tools Assembly Registration Tool (Regasm.exe)
http://msdn.microsoft.com/library/de...lregasmexe.asp
..NET Framework Developer's Guide Registering Assemblies
with COM
http://msdn.microsoft.com/library/de...ieswithcom.asp
see also
..NET Framework Tools Type Library Exporter (Tlbexp.exe)
http://msdn.microsoft.com/library/de...rTlbExpexe.asp
You may also have to add some code/attributes to the .NET
code to supply additional COM metadata/functionality.
To have a .NET application access a COM component you create
a Runtime Callable Wrapper (RCW). Visual Studio can do it
for you. However this is the tool to create one
independently:
..NET Framework Tools Type Library Importer (Tlbimp.exe)
http://msdn.microsoft.com/library/de...rtlbimpexe.asp
For ActiveX components see
NET Framework Tools Windows Forms ActiveX Control Importer
(Aximp.exe)
http://msdn.microsoft.com/library/de...erAximpexe.asp
Use Visual Studio .NET only to create the RCW if your
project is the only one that uses that COM library.
If the COM component is used by multiple .NET projects and
was developed in house create a Primary Interop Assembly
(PIA) and include it in a setup merge module.
..NET Framework Developer's Guide Primary Interop Assemblies
http://msdn.microsoft.com/library/de...assemblies.asp
..NET Framework Developer's Guide Registering Primary Interop
Assemblies
http://msdn.microsoft.com/library/de...assemblies.asp
if the COM library was developed by a vendor, obtain the PIA
from them.
In General
C# Programmer's Reference COM Interop Tutorials
http://msdn.microsoft.com/library/de...opTutorial.asp
Visual Basic Language Concepts Introduction to COM Interop
http://msdn.microsoft.com/library/de...opTutorial.asp
Microsoft .NET/COM Migration and Interoperability
http://msdn.microsoft.com/library/de...cominterop.asp
..NET Framework Developer's Guide Building .NET Framework
Components for Interoperation
http://msdn.microsoft.com/library/de...roperation.asp