We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 20,882 times

Contents

Related Categories

COM Interoperability in .NET Part 2 - Introduction

ggarung

Introduction

This article elucidates how to build and install-managed code that will be used from COM applications. A classic COM server is activated using the Service Control Manager (SCM). It looks up numerous information such as CLSIDs, IIDs, ProgIDs etc.

So what is the solution to use the .NET assemblies in the classic COM clients,

These are the steps concerned in the build process are as follows:

  1. Write and compile the managed code.
  2. Generate a COM type library (*.tlb) for the assembly using the tlbexp.exe utility so that allow the COM client to interact with the exposed types.
  3. Install and register the assembly so that COM SCM to locate it.
  4. Write and compile the COM code that references types in the assembly.

For demonstration purposes, I have created a .NET component in C# named Calculator. For client side, I have created a Visual Basic (VB) 6.0-based client.

G.Gnana Arun Ganesh is the Administrator and the Founder of ARUN MICRO SYSTEMS (www.arunmicrosystems.netfirms.com). He has been programming in C++, Visual Basic, COM, Java and Microsoft Technologies for 3+ years. Arun's background includes Bachelor degree in ECE.He is one of the Top authors writing articles in C# and .NET in various websites. He is an Active person in the panel of Technical Reviewers in Prentice Hall Publishers and Sams Publication. In .NET the last book he reviewed is the "C# how to program" written by Harvey and Paul Deitel. You can contact him through ggarung@rediffmail.com

Comments