Library tutorials & articles

Accessing a COM component

Introduction

This article explains step by step of accessing COM+ application using C#. The code is compiled using Beta 2. Microsoft (R) Visual C# Compiler Version 7.00.9254 [CLR version v1.0.2914]. It can be used with Beta1 with some minor modification.

If we want need to access the existing COM+ application with any .net supported language, we don't need to modify the single line of exisiting COM+ application, despite of the fact their execution model is completely different. Here is the step-by-step easy example of doing the same. We can access it in two ways, Early Binding and Late binding (remembered the old VB concepts). We will first look at Early binding example...

Comments

  1. 01 Jan 1999 at 00:00

    This thread is for discussions of Accessing a COM component.

  2. 30 Jun 2004 at 14:49

    I have a vb dll that has been using for years in some asp applications. Recently I am developing a asp.net application that need to use same vb dll. I did exactly the steps author listed in early binding section to call a vb dll from asp.net page writen in C#. I got Server Error "The specified module could not be found" when running on the localhost, and I got different server error:"System.UnauthorizedAccessException: Access is denied." after I deployed it to the test server. I did permission check everything seems in position. Any suggestion? Thanks.

  3. 11 Oct 2005 at 18:13

    I got the same error? Have you figured out how to fix it? Thanks a lot!

Leave a comment

Sign in or Join us (it's free).

Imtiaz Alam Imtiaz Alam is a Senior Developer, currently residing in Phoenix, Arizona. He has more than five years of development experience in developing Mirosoft based Solution.

Related discussion

Related podcasts

  • OnMicrosoft from InformIT: Promise and adoption of LINQ (Audio)

    Published 1 year ago, running time 0h15m

    Mads Torgersen, C# language spec owner interviews the co-authors of Essential LINQ - Charlie Calvert and Dinesh Kulkarni. of, linq, adoption, audio

Related jobs

Events coming up

Want to stay in touch with what's going on? Follow us on twitter or Facebook!