Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / October 2004

Tip: Looking for answers? Try searching our database.

Deploying .NET COM class library

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pieter.breed@gmail.com - 27 Oct 2004 12:04 GMT
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
Sujith S. Varier - 27 Oct 2004 15:51 GMT
Hello Pieter,

   I didnt got the chance to work with COM-.net interopratbility in a
professional env...But i had spent lil bit of my time with this for the sake
of learning. I think the only thing that we have to make sure is that. the
assemblies and the corresponding type libraries generated from these
assemblies are residing in the same folder, Suppose your assembly is having
a class that contains a method that returns or accepts a type (say a class
residing in another .net assembly), you should create the tlbs for those
types as well, and it should be present at the same folder where these
assemblies are residing.

   Nothing esle i can remember at thsi time..
:)

regards
Sujith S.Varier

> Hi All,
>
[quoted text clipped - 14 lines]
> Friendly Regards
> Pieter Breed
UAError - 27 Oct 2004 16:55 GMT
>Hi All,
>
[quoted text clipped - 14 lines]
>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/default.asp?url=/library/en-us/cptools/html/cp
grfassemblyregistrationtoolregasmexe.asp


.NET Framework Developer's Guide  Registering Assemblies
with COM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conregisteringassemblieswithcom.asp


see also
.NET Framework Tools Type Library Exporter (Tlbexp.exe)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cp
grfTypeLibraryExporterTlbExpexe.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/default.asp?url=/library/en-us/cptools/html/cp
grftypelibraryimportertlbimpexe.asp


For ActiveX components see
NET Framework Tools Windows Forms ActiveX Control Importer
(Aximp.exe)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cp
grfWindowsFormsActiveXControlImporterAximpexe.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/default.asp?url=/library/en-us/cpguide/html/cp
conprimaryinteropassemblies.asp


.NET Framework Developer's Guide Registering Primary Interop
Assemblies
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conregisteringprimaryinteropassemblies.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/default.asp?url=/library/en-us/csref/html/vcor
iCOMInteropTutorial.asp


Visual Basic Language Concepts  Introduction to COM Interop
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcor
iCOMInteropTutorial.asp


Microsoft .NET/COM Migration and Interoperability
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/comi
nterop.asp


.NET Framework Developer's Guide Building .NET Framework
Components for Interoperation
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conBuildingNETFrameworkComponentsForInteroperation.asp


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.