COM Interoperability in .NET Part 2

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.

You might also like...

Comments

About the author

G.Gnana Arun Ganesh

G.Gnana Arun Ganesh India

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 Technolo...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson