N/Direct - The .NET Interoperability Resource Center 

Books & Articles

 

 

 

Most Valuable Professional

Books & Articles


This is a collection of books, articles and white papers related to .NET interop that are well worth reading.

I don't intend to link to every interop article out there. For example, there are plenty of COM interop tutorials available (and many are crap, frankly), and there's no point in referring to them all. Instead, I try to cover a little bit of everything, and pick out some of the best resources on each topic.

If you know of a good resource that is missing from the list, please let me know.

 

Categories


Books
General
Platform Invocation Services (P/Invoke)
COM Interop
C++ Interop / It Just Works (IJW)
Marshaling and Memory Management
.NET Compact Framework
Office Automation and Add-ins
Data Access

 

Books

.NET and COM: The Complete Interoperability Guide
Author(s): Adam Nathan Language(s): C#, VB.NET, C++
This book covers almost everything there is to know about .NET interop. Highly recommended reading! Publisher: Sams Publishing. ISBN: 067232170X

COM and .NET Interoperability
Author(s): Andrew Troelsen Language(s): C#, VB.NET, C++, VB
Publisher: Apress. ISBN: 1590590112

COM Programming with Microsoft .NET
Author(s): Julian Templeman, John Paul Mueller Language(s): C++, C#
Publisher: Microsoft Press. ISBN: 0735618755

.NET Framework Solutions: In Search of the Lost Win32 API
Author(s): John Paul Mueller Language(s): C++, C#
Publisher: Sybex. ISBN: 078214134X

Professional Visual Basic Interoperability - COM and VB6 to .NET
Author(s): Rockford Lhotka, Billy Hollis Language(s): VB.NET, VB
Publisher: Wrox. ISBN: 1861005652

Programming with Managed Extensions for Microsoft Visual C++ .NET
Author(s): Richard Grimes Language(s): C++
This is not a book dedicated to interop, but it contains an excellent chapter on IJW interop. The chapter is available for reading online. Publisher: Microsoft Press. ISBN: 0735617244

.NET and COM: Working Together
Author(s): Brian Noyes Language(s): C#, C++
An e-book with an introduction to COM interop. Publisher: MightyWords

 

General

An Overview of Managed/Unmanaged Code Interoperability
Author(s): Sonja Keserovic, David Mortenson, Adam Nathan Language(s):
This article provides basic facts about interoperability between managed and unmanaged code, and guidelines and common practices for accessing and wrapping unmanaged API from managed code, and for exposing managed APIs to unmanaged callers. Security and reliability considerations, performance data, and general practices for development processes are also highlighted.

Interoperating with Unmanaged Code
Author(s): Microsoft Language(s):
The interop section of the .NET Framework SDK documentation.

Microsoft .NET/COM Migration and Interoperability
Author(s): Steve Busby, Edward Jezierksi Language(s):
The interoperability features of the Microsoft .NET Framework will enable developers to continue using traditional Active Server Pages, Component Object Model applications, and Microsoft Win32 DLLs, making it easier to choose if and when to migrate existing managed code to .NET.

Migrating Native Code to the .NET CLR
Author(s): Don Box Language(s): C#, VB

Using Existing Code in C#
Author(s): Eric Gunnerson Language(s): C#

Using the .NET Framework SDK Interoperability Tools
Author(s): Sam Gentile Language(s):

 

Platform Invocation Services (P/Invoke)

Calling Win32 DLLs in C# with P/Invoke
Author(s): Jason Clark Language(s): C#

Using dumpbin.exe as an Aid for Declaring P/Invokes
Author(s): Chris Tacke Language(s): C#
Learn how to use dumpbin.exe as an aid for declaring P/Invokes in Microsoft .NET Compact Framework-based applications.

Break API Barriers
Author(s): Robert Teixeira Language(s): VB.NET
VB.NET gives you unprecedented control over pointers and API function calls, courtesy of the .NET Common Language Runtime.

 

COM Interop

Beyond (COM) Add Reference: Has Anyone Seen the Bridge?
Author(s): Sam Gentile Language(s):
Sam Gentile explains the need for bridges between COM Interop and the Microsoft .NET Framework, and how bridges are implemented in the .NET Framework.

Calling COM Components from .NET Clients
Author(s): Mike Gunderloy Language(s): VB.NET, VB
In this document, you'll learn the details of calling COM servers from .NET clients.

Calling a .NET Component from a COM Component
Author(s): Mike Gunderloy Language(s): VB.NET, VB
Walks through the details of how to call Microsoft .NET servers from COM clients.

Primary Interop Assemblies (PIAs)
Author(s): Microsoft Language(s):
This document explains the process of creating metadata that describes a set of existing COM types to interoperate with the common language runtime.

Managing COM Object Lifetime in a Garbage-Collected Environment
Author(s): Adam Nathan Language(s):

Tips for Designing COM-Friendly .NET Class Libraries
Author(s): Adam Nathan Language(s):

Tricks for Modifying Interop Assemblies
Author(s): Adam Nathan Language(s):

Understanding Classic COM Interoperability With .NET Applications
Author(s): Aravind Corera Language(s): C#
Discusses how existing COM components can be used from managed code.

COM Interop Not Fundamentally Flawed But Hard
Author(s): Sam Gentile Language(s):

Is COM interop Fundamentally Flawed?
Author(s): Sam Gentile Language(s):

ADO Data Access through COM Interop in .NET
Author(s): Kannan Kalyanaraman Language(s): C#
This article explains how to access traditional COM objects from .NET. For demonstrating the interop we will first see how to display the DataLink Property Dialog which is exposed as a COM object through the Ole Db Service Component. We will also see how to access traditional ADO Component from .NET.

Create Namespace Extensions for Windows Explorer with the .NET Framework
Author(s): Dave Rensin Language(s): C#
Extending the Windows shell with namespace extensions allows you to create some custom functionality for Windows Explorer. This article illustrates the process of creating custom shell namespace extensions using C# and the .NET Framework.

Creating a shell extension with C#
Author(s): Richard Birkby Language(s): C#
Demonstrates building a Windows Explorer shell extension using C# and ComInterop.

Explorer column handler shell extension in C#
Author(s): Richard Birkby Language(s): C#
This article shows how to write a column handler shell extension for Explorer's 'Detail' view using C#.

Extending Explorer with Band Objects using .NET and Windows Forms
Author(s): Pavel Zolnikov Language(s): C#
Walks you through the implementation of an Explorer bar with the help of BandObject base class. Describes implementation details of the BandObject class.

 

C++ Interop / It Just Works (IJW)

Mixed DLL Loading Problem
Author(s): Scott Currie Language(s): C++
Applications using mixed DLLs, a combination of both native and Microsoft Intermediate Language (MSIL) DLLs, created with the Visual C++ .NET and Visual C++ .NET 2003 compiler can encounter deadlock scenarios under some circumstances while being loaded. This document explains the problem in detail, describes the solutions that are expected in the next version of the Visual C++ .NET compiler and the common language runtime (runtime), and provides information about workarounds for the Visual C++ .NET 2002 and the Visual C++ .NET 2003 toolsets.

Semicolon - Finding bugs the hard way
Author(s): Nick Hodapp Language(s): C++
Nick discusses the Loader Lock issue in VC++ .NET. Don't get bit.

Implementing Callback functions using IJW (avoiding DllImport)
Author(s): Nishant S Language(s): C++
Shows how you can call native API functions that require callbacks using IJW, and without the use of DllImport attribute.

Intro to Managed C++, Part 2: Mixing Managed and Unmanaged Code
Author(s): Sam Gentile Language(s): C++

 

Marshaling and Memory Management

Pointers Add Power and Safety
Author(s): Robert Teixeira Language(s): VB.NET
VB.NET comes as close to having pointers as VB ever has, while making memory manipulation safer at the same time.

 

.NET Compact Framework

Advanced P/Invoke on the Microsoft .NET Compact Framework
Author(s): Jon Box, Dan Fox Language(s): VB.NET, C#
Explore advanced interoperability on the .NET Compact Framework.

An Introduction to P/Invoke and Marshaling on the Microsoft .NET Compact Framework
Author(s): Jon Box, Dan Fox Language(s): VB.NET, C#
Learn how to use the Platform Invoke (P/Invoke) feature of the .NET Compact Framework.

Creating a P/Invoke Library
Author(s): Geoff Schwab Language(s): VB.NET, C#
This sample demonstrates how to P/Invoke numerous useful native functions that are not directly available through the .NET Compact Framework.

Marshalling Types During Platform Invoke (P/Invoke) on the Microsoft .NET Compact Framework
Author(s): Content Master Ltd Language(s): C#
Learn how to marshal data between managed and unmanaged code using the .NET Compact Framework.

Writing Unmanaged Functions for Microsoft .NET Compact Framework-based Applications
Author(s): Content Master Ltd Language(s): C#, C++
Learn how to create unmanaged functions that you can use in your Smart Device applications through Platform Invoke.

 

Office Automation and Add-ins

Programming Microsoft Word 2002 and Excel 2002 with Microsoft Visual C#
Author(s): Kerry Loynd, Siew-Moi Khor Language(s): C#
Learn about COM interoperability between Microsoft C# and large, complex COM servers. This article shows how to prepare the Office XP COM objects and how to use them in a C# program, and offers some tips on understanding why things have to be done in certain ways.

Automating Word and Excel with C#
Author(s): Kerry Loynd Language(s): C#
This paper describes the basics of automating Office components such as Word and Excel using C#.

Visual Studio Tools for Office
Author(s): Brian A. Randall Language(s): C#, VB.NET
Provides an overview of how you can use the new Visual Studio .NET 2003 project templates provided by Microsoft "Visual Studio Tools for Office" to create solutions that use Microsoft Office Excel 2003 and Microsoft Office Word 2003. It includes steps for installing the product and creating new projects, and discusses issues concerning deployment, security, and project sharing.

Programming Office Applications Using Visual C#
Author(s): Ken Getz Language(s): C#, VB.NET
Presents some of the issues that C# developers must be aware of when using "Visual Studio Tools for Office" to create Word and Excel applications. Discusses how to work with the VBA-focused methods and properties for Word and Excel, and provides examples comparing Visual Basic .NET code with the corresponding C# code.

Understanding the Word Object Model from a .NET Developers Perspective
Author(s): Mary Chipman Language(s): C#, VB.NET
Provides information on how to use Microsoft "Visual Studio Tools for Office" to take advantage of the objects available in Microsoft Office Word 2003. It introduces several important Word objects and provides examples of how to use them. You will learn how to work with Word 2003 applications and documents, as well as with some of the more important properties and methods.

Understanding the Excel Object Model from a .NET Developers Perspective
Author(s): Ken Getz Language(s): C#, VB.NET
Discusses some of the objects provided by Microsoft Office Excel 2003 and explains how you can use them to create managed code solutions with Microsoft "Visual Studio Tools for Office." The focus is mainly on the Application, Workbook, Worksheet, and Range objects. Visual Basic .NET and Visual C# code examples demonstrate some of the properties, methods, and events of each object.

A Primer to the Office XP Primary Interop Assemblies
Author(s): Chris Kunicki Language(s): VB.NET
Learn how to use the Office XP Primary Interop Assemblies to extend and automate Office XP features from Microsoft Visual Studio .NET code projects.

Tips and Tricks: Building Microsoft Office Add-ins with Visual C# .NET and Visual Basic .NET
Author(s): Robin Reynolds-Haertle Language(s): VB.NET, C#
This article describes several techniques useful for creating Office add-ins with Visual Studio .NET. Topics include using the Office object models, C#-specific changes when using the Office object models, and debugging. Readers with some add-in or Visual Basic for Applications experience will gain the most from this article.

Creating Office Managed COM Add-Ins with Visual Studio .NET
Author(s): Paul Cornell Language(s): VB.NET

Office XP Primary Interop Assemblies Known Issues
Author(s): Paul Cornell, Frank C. Rice Language(s): VB.NET, C#
This article provides a digest of known issues regarding the Office XP Primary Interop Assemblies (PIAs).

Working with the Office XP Primary Interop Assemblies
Author(s): Paul Cornell Language(s): VB.NET
This article provides a digest of known issues regarding the Office XP Primary Interop Assemblies (PIAs).

Secure Deployment of Managed COM Add-Ins in Office XP
Author(s): Misha Shneerson, Siew-Moi Khor Language(s): VB, C++
Learn how to securely install and deploy managed COM add-ins in Microsoft Office XP. Also learn how to build unmanaged COM add-in proxies called shims in both Visual Basic 6.0 and Visual C++ and how they work.

Deployment of Managed COM Add-Ins in Office XP
Author(s): Misha Shneerson, Siew-Moi Khor Language(s): C++
How to consider security pertaining to the installation and deployment of managed COM add-ins and smart tags in Office XP. Possible solutions to ensure strict Office XP security conformity are also presented and discussed.

Using the COM Add-in Shim Solution to Deploy Managed COM Add-ins in Office XP
Author(s): Misha Shneerson, Siew-Moi Khor Language(s):
How to use the COM add-in shim solution template to enable secure managed COM add-in deployment in Microsoft Office XP.

Using the Smart Tag Shim Solution to Deploy Managed Smart Tags in Office XP
Author(s): Misha Shneerson, Siew-Moi Khor Language(s):
How to use the smart tag shim solution template to enable secure managed smart tags deployment in Office XP.

Building Smart Tags in Microsoft Visual Basic .NET
Author(s): J Sawyer Language(s): VB.NET
This article will show you how to create a simple smart tag with Visual Basic .NET Beta 2.

Building Outlook 2002 Add-ins with Visual Basic .NET
Author(s): Randy Byrne Language(s): VB.NET
Learn how to use Visual Basic .NET to develop COM add-ins for Outlook 2002. The sample Visual Basic .NET Outlook COM add-in resolves Contact mailing addresses with an XML Web service.

Programming Outlook with C#
Author(s): Rodger Brennan Language(s): C#
In this article we'll look at different approaches to working with Outlook folders, and walk through creating items in Outlook with C#.

Microsoft Office and .NET Interoperability
Author(s): Paul Cornell Language(s): VB.NET

 

Data Access

.NET Interop for Visual FoxPro Applications
Author(s): Rick Strahl Language(s): Visual FoxPro, C#
In this article Rick looks at the most common ways that you can use to integrate logic and data between Visual FoxPro and .NET.

ADO Data Access through COM Interop in .NET
Author(s): Kannan Kalyanaraman Language(s): C#
This article explains how to access traditional COM objects from .NET. For demonstrating the interop we will first see how to display the DataLink Property Dialog which is exposed as a COM object through the Ole Db Service Component. We will also see how to access traditional ADO Component from .NET.

ADO Rocks and Rolls in .NET Applications
Author(s): Dino Esposito Language(s): C#
NOTE: Written around Beta 1 time, so the content is somewhat inaccurate.

Revisiting the Use of ADO in .NET Applications
Author(s): Dino Esposito Language(s): C#