Home arrow C# arrow Using Late Bound COM Objects
C#

Using Late Bound COM Objects


There are different methods available for invoking COM objects at runtime in .NET, including late binding. In this article Beth from the Wrox team will walk us through them, providing examples for each.

Author Info:
By: Wrox Team
Rating: 5 stars5 stars5 stars5 stars5 stars / 35
November 18, 2002
TABLE OF CONTENTS:
  1. · Using Late Bound COM Objects
  2. · Introductory Concepts
  3. · Late Binding in .NET: The Basic Invocation
  4. · Late Binding in .NET: With a Runtime Callable Wrapper Available
  5. · Late Binding in .NET: Monitoring Performance of the Various Invocation Methods
  6. · Conclusion

print this article
SEARCH DEVARTICLES

Using Late Bound COM Objects
(Page 1 of 6 )

Editor's Note: This article's code has been updated to work with the final release of the .Net framework.

This article will describe how to late bind to COM objects in .NET. Interoperability with COM objects has been well-integrated into the .NET runtime. Indeed, early binding is quite straightforward and has already been covered quite well in Kaushal Sanghavi's articles on COM(+) interoperability (see reference list at the end of this article). Judging by the postings in the .NET newsgroups, however, there appears to be some lingering confusion about how to bind to COM objects at runtime. This article will discuss the different methods available for invoking COM objects at runtime. After a brief review of late binding (and why it should sometimes be avoided), we will walk through three different invocation scenarios and explore the appropriate C# syntax to use. We will end with a brief look at the relative performance of each method.

Prerequisites
Our discussion assumes you understand the basic concepts of COM interoperability in .NET. If you are just getting up to speed on the topic, see the list of references at the end of this article. In particular, you should understand what a Runtime Callable Wrapper is, and how one is generated.
blog comments powered by Disqus
C# ARTICLES

- Introduction to Objects and Classes in C#, P...
- Visual C#.NET, Part 1: Introduction to Progr...
- C# - An Introduction
- Hotmail Exposed: Access Hotmail using C#
- Razor Sharp C#
- Introduction to Objects and Classes in C#
- Making Your Code CLS Compliant
- Programming with MySQL and .NET Technologies
- Socket Programming in C# - Part II
- Socket Programming in C# - Part I
- Creational Patterns in C#
- Type Conversions
- Creating Custom Delegates and Events in C#
- Inheritance and Polymorphism
- Understanding Properties in C#

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials