N/Direct - The .NET Interoperability Resource Center 

r4 r4 card r4 ds card links of london sweetie bracelet thomas sabo online shop r4i card

Knowledge Base

 

 

 

Most Valuable Professional

Knowledge Base


The following is a list of interop related articles in the Microsoft Knowledge Base (KB). The list is not guaranteed to be complete, it has been compiled manually. If you think an article is missing or incorrectly categorized, or find that one has been removed or has changed title, please don't hesitate to contact me.

The list is sorted by category. If you prefer, you can also view them sorted by article ID.

If you want to be notified of new articles in the Microsoft Knowledge Base, I recommend you subscribe to kbAlertz.

 

Categories


General
VS.NET and the .NET Framework SDK Tools
Language or Compiler Specifics
Platform Invocation Services (P/Invoke)
COM Interop
C++ Interop / It Just Works (IJW)
Marshaling and Memory Management
Interop Debugging
Office Automation and Add-ins
Data Access
Windows Shell
Internet Explorer and the Web Browser Control
ActiveX Controls
ASP and ASP.NET

 

General

PRB: Overloaded Methods in a .NET Component May Not Be Version-Compatible for Unmanaged Clients (317626) 

PRB: Premature Garbage Collection of Object Reference (309327)   [VB.NET]

 

VS.NET and the .NET Framework SDK Tools

BUG: New Interop DLL Is Not Put in the Correct Location for the Project When a COM Component Is Added (820126)   [C++]

PRB: "Access to the Registry Key Denied" Error Message When You Register .NET Assembly for COM Interop (327507) 

BUG: TlbImp Silently Produces an Unloadable Assembly Without Warning (327128) 

Access Violation in Type Library Importer When You Import More Than 81 Event Interfaces (322376) 

PRB: Cannot Add ActiveX Control to Toolbox (320780) 

BUG: Tlbimp.exe Generates Interface Wrappers that Cannot Be Used (318608)   [VB.NET]

Tlbimp.exe Cannot Handle Coclasses That List Source Interfaces That Are Defined in a Different Type Library (318466) 

PRB: Tlbexp.exe May Produce Invalid Method Declarations (317322) 

BUG: Type Library Importer Imports VARIANT_BOOL Field as Int16 (317203) 

PRB: Helpstring Information May Be Lost During COM Interop (317116) 

FIX: Type Library Importer (Tlbimp.exe) Fails to Parse Certain Type Libraries (316552) 

PRB: Error Message When You Add a COM Component: Converting the Type Library to a .NET Assembly Failed (316142)   [VB.NET]

BUG: "Type Mismatch" Error When You Assign Value Type Variable to Property Through COM InterOp (316138)   [VB.NET]

DOC: Office XP Service Pack 1 Is Required to Run Word Interop Sample in .NET Framework (315155) 

PRB: "Assembly Generation Failed" Error Message When You Try to Build a Managed DLL Without a Strong Name (313666) 

BUG: NWFREADME:Word Interoperability Sample Generates An Exception Error Using the Word Find Object (313104)   [C#]

 

Language or Compiler Specifics

BUG: "Public Overrides WriteOnly Property..." Error When You Try to Override a Microsoft Visual Basic 6.0 Property in Microsoft Visual Basic .NET (818216)   [VB.NET]

HOW TO: Implement .NET COM Interfaces that Require ByRef Parameters (325742)   [J#]

BUG: "System.InvalidCastException" Error Message When You Pass a Collection from a .NET-Connected Application to Visual Basic 6.0 Components (323737)   [VB.NET]

HOW TO: Check the Type of a COM Object (System.__ComObject) with Visual C# .NET (320523)   [C#]

PRB: Unhandled Exception When You Pass Non-Public Class Object to COM DLL (317273)   [VB.NET]

BUG: Compile Error Message When You Implement a Class in a Referenced COM Library (316581)   [VB.NET]

BUG: "Object Variable or With Block Variable Not Set" Error Message When You Access a Public Object Variable (316478)   [VB.NET]

PRB: Error Message When You Attempt to Build a Class Library Project: COM Interop Registration Failed (316163)   [VB.NET]

BUG: "Type Mismatch" Error When You Assign Value Type Variable to Property Through COM InterOp (316138)   [VB.NET]

HOW TO: Use ActiveX Components in Visual Studio .NET with Visual Basic .NET (315847)   [VB.NET]

PRB: Visual Basic .NET Does Not Support the ComImport Attribute to Manually Declare a COM Component (313506)   [VB.NET]

HOW TO: Convert from System::String* to Char* in Visual C++ .NET (311259)   [C++]

HOW TO: Pass Optional Method Arguments from C# (305814)   [C#]

 

Platform Invocation Services (P/Invoke)

BUG: Exception Error When You Use a Declare Function that Returns a Date Type in Visual Basic .NET (327113)   [VB.NET]

PRB: String That You Pass to Unmanaged Win32 API in Visual Studio .NET Returns Empty (321078)   [C#, VB.NET]

HOW TO: Set a Windows Hook in Visual C# .NET (318804)   [C#]

HOW TO: Use the Unmanaged HTML Help API from a Managed Visual C# .NET Application (317406)   [C#]

 

COM Interop

FIX: COM Interop Call May Return Incorrect HRESULT (828943) 

BUG: A Visual Basic Application Stops Responding While It Disconnects from the Managed Event Source (827418) 

FIX: Marshal.ReleaseComObject Does Not Correctly Release Objects That Implement the IDisposable Interface (826915) 

FIX: "COMException - Type Mismatch" Error Message When You Pass a VARIANT Parameter from Managed Code (818982) 

HOW TO: Call Visual Basic .NET Assembly from Visual Basic 6.0 and Call Visual Basic COM Component from Visual Basic .NET (817248)   [VB.NET, VB]

PRB: IntelliSense Features Do Not Appear in Visual Basic 6.0 for .NET COM Interop Components (813809)   [VB.NET]

Access Violation May Occur in COM Modules When Managed Process Exits (813588) 

FIX: .NET Framework Implementation of IEnumConnections::Next Causes the Client Application to Stop Responding (813105) 

HOWTO: Establish a COM Event Sink in the .NET Framework With Return Values by Using Visual C# .NET (811645)   [C#]

HOW TO: Establish a COM Event Sink with Return Values in the .NET Framework by Using Visual Basic .NET (810228)   [VB.NET]

FIX: ExecutionEngineException Error After a Typical Exception Is Thrown (330900) 

FIX: You receive a "NullReferenceException" error message when you try to pass a .NET Framework class to a COM wrapper class (328557) 

PRB: InterOp Interfaces Must Match Vtable Layout for Early Binding to Work (327116)   [VB.NET]

COM Interop Cannot Propoerly Deal with A Disconnected Stub (325699) 

HOW TO: Wrap a UCOMIStream in a Stream Class in Visual Basic .NET (321695)   [VB.NET]

HOW TO: Wrap a UCOMIStream in a Stream Class (321340)   [C++]

HOW TO: Set Up a COM Component to Be Used from a .NET Client Across Computer Boundaries (318614)   [C#]

BUG: .NET Method That Takes a ByRef Value Type Parameter Fails When You Pass a Variant Type (317887)   [VB.NET]

BUG: System.OutOfMemoryException Thrown When You Invoke a COM Method That Returns a Structure Containing a String Array (317624)   [VB.NET, VB]

HOW TO: Handle Arrays Returned as Variants from Visual Basic COM Object (317030)   [C#, VB.NET, VB]

BUG: InvalidCastException When You Call a COM Component That Is Marked as STA (309330) 

HOW TO: Interoperate with a COM Server That Returns Conformant Arrays by Using Visual BASIC .NET (306801)   [VB.NET]

HOW TO: Interoperate with a COM Server That Returns Conformant Arrays by Using Visual C# .NET (305990)   [C#]

 

C++ Interop / It Just Works (IJW)

PRB: Linker Warnings When You Build Managed Extensions for C++ DLL Projects (814472)   [C++]

BUG: AppDomainUnloaded Exception When You Use Managed Extensions for C++ Components (309694)   [C++]

 

Marshaling and Memory Management

FIX: OutOfMemoryException Occurs When You Access Non-Fixed Size Safe Arrays in a User-Defined Type (327107) 

BUG: Some Marshal Class APIs Throw System.ExecutionEngineException If You Pass a Pointer, ByRef, or Array Type (327106) 

FIX: Marshaling of Fixed Arrays of BSTR Fields in .NET Framework (324181) 

FIX: Marshalling Structures that Contain SafeArray Fields (322172) 

BUG: Call to Managed Class Method with StringBuilder as In or Out Parameter May Fail (317577)   [C#, C++]

BUG: TypeLoadException Is Generated Instead of MarshalDirectiveException (317007)   [C#]

FIX: COM Interop Marshaler Incorrectly Matches Types Between Assemblies (316334) 

BUG: COM Interop: No Built-in Support VARIANT of Type VT_RECORD (309329) 

 

Interop Debugging

HOW TO: Use the Microsoft Visual Studio .NET Native Debugger to Debug a Microsoft Visual Basic 6.0 DLL When It Is Called from an ASP.NET Application (811658) 

 

Office Automation and Add-ins

PRB: Primary Interop Assembly (PIA) Install Occurs the First Time That You Open a Microsoft Office Document That Is Referenced by a Managed Code Extension (823986) 

INFO: Microsoft Office XP PIAs Are Available for Download (328912) 

PRB: "Member Not Found" Error Message When You Use a For Each Statement on an Excel Collection with Visual Basic .NET or Visual C# .NET (328347)   [VB.NET]

HOW TO: Handle Events for the Office Web Components in Visual Studio .NET (328275)   [C#]

OL2002: COM Add-Ins Are Not Trusted If They Are Created with Visual Studio .NET (322027) 

BUG: "Old Format or Invalid Type Library" Error When Automating Excel 2002 (320369)   [C#, VB.NET, C++]

HOW TO: Handle Events for the Office XP Chart Component on a Windows Form in Visual C# .NET (319559)   [C#]

HOW TO: Handle Events for the Office XP Chart Component by Using Visual Basic .NET (319557)   [VB.NET]

PRB: InvalidCastException When You Bind Office XP Web Component on a .NET Windows Form (319398)   [VB.NET]

HOW TO: Handle Events for the Office XP Spreadsheet Component on a Windows Form in Visual Basic .NET (319342)   [VB.NET]

HOW TO: Handle Events for the Office XP Spreadsheet Component on a Windows Form in Visual C# .NET (319341)   [C#]

PRB: Errors When You Reference the Access 10.0 Type Library with Visual Studio .NET (317157) 

HOW TO: Automate Microsoft Access From Visual C# .NET (317114)   [C#]

HOW TO: Automate Microsoft Access From Visual Basic .NET (317113)   [VB.NET]

PRB: Office Application Does Not Quit After Automation from Visual Studio .NET Client (317109)   [VB.NET]

PRB: Macro Warning in Office Application When You Load .NET Add-in (316724) 

PRB: Visual Studio .NET Shared Add-in Is Not Displayed in Office COM Add-ins Dialog Box (316723) 

PRB: Error Using WithEvents or Delegates to Handle Excel Events from Visual Basic .NET or Visual C# .NET (316653)   [VB.NET]

HOW TO: Automate Word from Visual C# .NET to Create a New Document (316384)   [C#]

HOW TO: Automate Word from Visual Basic .NET to Create a New Document (316383)   [VB.NET]

HOW TO: Use Visual C# .NET to Automate a Running Instance of an Office Program (316126)   [C#]

PRB: Visual C# .NET Error Attaching to Running Instance of Office Application (316125)   [C#]

BUG: Visual Basic .NET "'[Method]' is ambiguous across the inherited interfaces" Error Message When Using Office Automation (315981)   [VB.NET]

HOW TO: Retrieve Contacts by Using Outlook Object Model in Visual Basic .NET (313802)   [VB.NET]

HOW TO: Retrieve Appointments by Using the Outlook Object Model in Visual Basic .NET (313801)   [VB.NET]

HOW TO: List Members of a Distribution List by Using Outlook Object Model in Visual Basic .NET (313797)   [VB.NET]

HOW TO: List the File Menu Commands by Using Outlook Object Model in Visual Basic .NET (313796)   [VB.NET]

HOW TO: Retrieve Unread Messages from Inbox by Using Outlook Object Model in Visual Basic .NET (313795)   [VB.NET]

HOW TO: Delete an Outlook Folder by Using Outlook Object Model in Visual Basic .NET (313791)   [VB.NET]

HOW TO: Create a Meeting Request by Using Outlook Object Model in Visual Basic .NET (313789)   [VB.NET]

HOW TO: Create an Appointment by Using Outlook Object Model in Microsoft Visual Basic .NET (313788)   [VB.NET]

INFO: Develop Microsoft Office Solutions with Visual Studio .NET (311452) 

BUG: InvalidCastException Is Generated When You Try to Sink Outlook Application Events (309336) 

PRB: Visual Basic .NET Error Using GetObject or GetActiveObject For Running Instance of Office Application (308409)   [VB.NET]

HOWTO: Handle PowerPoint Events With Visual C# .NET (308825)   [C#]

HOWTO: Handle PowerPoint Events With Visual Basic .NET (308330)   [VB.NET]

HOW TO: Use ASP.NET to Query and Display Database Data in Excel by Using Visual Basic .NET (308247)   [VB.NET]

HOWTO: Dismiss a Dialog Box Displayed by an Office Application with Visual Basic .NET (307292)   [VB.NET]

HOW TO: Transfer XML Data to Microsoft Excel 2002 by Using Visual C# .NET (307029)   [C#]

HOW TO: Transfer XML Data to Microsoft Excel 2002 by Using Visual Basic .NET (307021)   [VB.NET]

HOW TO: Run Office Macros Using Automation From Visual C# .NET (306683)   [C#]

HOWTO: Run Office Macros Using Automation From Visual Basic .NET (306682)   [VB.NET]

HOW TO: Create an Office XP Smart Tag DLL by Using Visual C# .NET (306422)   [C#]

HOW TO: Create an Office XP Smart Tag DLL by Using Visual Basic .NET (306058)   [VB.NET]

HOW TO: Transfer Data to an Excel Workbook by Using Visual C# .NET (306023)   [C#]

HOW TO: Transfer Data to an Excel Workbook by Using Visual Basic .NET (306022)   [VB.NET]

HOWTO: Use the WebBrowser Control to Open Office Documents with Visual C# .NET (304662)   [C#]

HOWTO: Use the WebBrowser Control to Open an Office Document in Visual Basic .NET (304643)   [VB.NET]

HOWTO: Create an Excel Macro Using Automation from Visual C# .NET (303872)   [C#]

HOW TO: Create an Excel Macro by Using Automation from Visual Basic .NET (303871)   [VB.NET]

HOWTO: Use Automation to Create and Show a PowerPoint Presentation with Visual C# .NET (303718)   [C#]

HOWTO: Use Automation to Create and Show a PowerPoint Presentation with Visual Basic .NET (303717)   [VB.NET]

HOWTO: Use Automation to Get and Set Office Document Properties with Visual C# .NET (303296)   [C#]

HOWTO: Use Automation to Get and Set Office Document Properties with Visual Basic .NET (303294)   [VB.NET]

HOWTO: Use Automation to Create Office Command Bars and Controls with Visual C# .NET (303018)   [C#]

HOWTO: Use Automation to Create Office Command Bars and Controls with Visual Basic .NET (303017)   [VB.NET]

HOW TO: Binding for Office Automation Servers with Visual Basic .NET (304661)   [VB.NET]

HOWTO: Binding for Office Automation Servers with Visual C# .NET (302902)   [C#]

HOW TO: Build an Office COM Add-in by Using Visual C# .NET (302901)   [C#]

HOW TO: Build an Office COM Add-in by Using Visual Basic .NET (302896)   [VB.NET]

HOWTO: Handle Events for Word Using Visual C# .NET (302817)   [C#]

HOWTO: Handle Events for Microsoft Word Using Microsoft Visual Basic .NET (302816)   [VB.NET]

HOW TO: Handle Events for Excel by Using Visual C# .NET (302815)   [C#]

HOW TO: Handle Events for Excel by Using Visual Basic .NET (302814)   [VB.NET]

HOWTO: Obtain the Window Handle for an Office Automation Server Using Visual C# .NET (302295)   [C#]

HOWTO: Obtain the Window Handle for an Office Automation Server Using Visual Basic .NET (302281)   [VB.NET]

HOWTO: Automate Excel With Visual C# .NET To Fill or Obtain Data In a Range Using Arrays (302096)   [C#]

HOWTO: Automate Excel From Visual Basic .Net To Fill or Obtain Data In a Range Using Arrays (302094)   [VB.NET]

HOWTO: Automate Microsoft Excel from Microsoft Visual C# .NET (302084)   [C#]

HOWTO: Automate Microsoft Excel from Visual Basic .NET (301982)   [VB.NET]

HOWTO: Automate Microsoft Word to Perform Mail Merge from Visual C# .NET (301659)   [C#]

HOWTO: Automate Microsoft Word to Perform a Mail Merge from Visual Basic .NET (301656)   [VB.NET]

 

Data Access

BUG: Object Reference is Not Set to an Instance of an Object (810098)   [C#]

HOW TO: Use DTS Package Events in Visual Basic .NET (321525)   [VB.NET]

An Access Violation Occurs in ADO Under Heavy Stress with .NET COM Interop or Java (321415) 

HOW TO: Handle Data Transformation Services Package Events in Visual C# .NET (319985)   [C#]

INFO: Using the Primary Interop Assembly for ADO (ADODB) in Visual Studio .NET (318559) 

HOW TO: Use ADO Recordsets in Visual Basic .NET (315974)   [VB.NET]

INFO: Roadmap for Using ADO in .NET (315974)   [VB.NET]

INFO: Microsoft .NET Framework Does Not Support Data Access Object (311058)   [VB.NET]

PRB: Unhandled Exception When You Set ADO Property to a String in Visual C# .NET (309047)   [C#]

PRB: Unhandled Exception When You Set ADO Property to a String in Visual Basic .NET (308499)   [VB.NET]

HOW TO: Open ADO Connection and RecordSet Objects in Visual C# .NET (308611)   [C#]

HOW TO: Open ADO Connection and Recordset Objects by Using Visual Basic .NET (308047)   [VB.NET]

 

Windows Shell

HOW TO: Implement a Managed Component that Wraps the Browse For Folder Common Dialog Box by Using Microsoft Visual Basic .NET (811004)   [VB.NET]

HOW TO: Use the SHGetFileInfo Function to Get the Icons That Are Associated with Files in Visual C# .NET (319350)   [C#]

HOW TO: Use the SHGetFileInfo Function to Get the Icons That Are Associated with Files in Visual Basic .NET (319340)   [VB.NET]

HOW TO: Implement a Managed Component that Wraps the Browse For Folder Common Dialog Box by Using C# (306285)   [C#]

 

Internet Explorer and the Web Browser Control

FIX: Your Windows Forms user control does not print and does not appear in Print Preview in Internet Explorer (835847) 

A licensed Windows Forms user control does not appear in the browser if you connect to the Web site by using Windows NT authentication (834855) 

BeforeNavigate2 Event of WebBrowser Control Does Not Fire (327135) 

INFO: WebOCHostCSharp.exe Hosts the WebBrowser Control in C# .NET (326217)   [C#]

WebOCHostVB.exe Hosts the WebBrowser Control in Visual Basic .NET (311303)   [VB.NET]

BUG: The BeforeNavigate2 Event of WebBrowser Control Does Not Fire If Hosted in a Visual C# .NET Application (325079)   [C#]

BUG: BeforeNavigate2 Event of WebBrowser Control Does Not Fire If Hosted in Visual Studio .NET Application (311298) 

FIX: Windows Control That Is Hosted in Microsoft Internet Explorer Leaks Unmanaged Resources (324547) 

FIX: OnKeyUp Event Does Not Fire for WebBrowser Control (322173) 

INFO: Native Versus COM-Callable .NET Controls in Internet Explorer (317346) 

HOW TO: Sink Managed Visual Basic Events in Internet Explorer Script (316516)   [VB.NET]

HOW TO: Sink Managed C# Events in Internet Explorer Script (313891)   [C#]

HOW TO: Host a WebBrowser Control in Visual C# .NET to Post Form Data (313068)   [C#]

HOW TO: Host a WebBrowser Control in Visual Basic .NET to Post Form Data (311294)   [VB.NET]

HOW TO: Handle Document Events in a Visual C# .NET Application (312777) 

PRB: Cannot Retrieve Top-Level IWebBrowser2 Interface from a .NET UserControl (311299) 

HOW TO: Handle Document Events in a Visual Basic .NET Application (311284) 

HOW TO: Deploy COM Interop Programs to Internet Explorer (311297) 

HOW TO: Automate Internet Explorer Within a Contained Visual Basic .NET UserControl (311295) 

HOW TO: Invoke the Find, View Source, and Options Dialog Boxes for the WebBrowser Control from Visual Basic .NET (311288)   [VB.NET]

HOW TO: Use the WebBrowser Control NewWindow2 Event in Visual Basic .NET (311282)   [VB.NET]

BUG: Using the WebBrowser Control on Windows.Forms.Form with the Opacity Set to "< 1" Causes the Computer to Fail (306719) 

HOWTO: Use the WebBrowser Control to Open Office Documents with Visual C# .NET (304662)   [C#]

HOWTO: Use the WebBrowser Control to Open an Office Document in Visual Basic .NET (304643)   [VB.NET]

 

ActiveX Controls

PRB: The ActiveX User Control Is Not Visible in the Form Designer When You Reopen an Existing Project (818220) 

PRB: Microsoft Visual Basic .NET Does Not Support Adding ActiveX Controls and Licenses at Run Time (814361)   [VB.NET]

FIX: The Windows Forms ActiveX Control Importer (Aximp.exe) Does Not Handle Default Values Correctly (811532) 

HOW TO: Dynamically Add ActiveX Controls that Require Run-Time Licenses in Visual C# .NET (326652)   [C#]

HOW TO: Dynamically Add ActiveX Controls that Require Run-Time Licenses in Visual Basic .NET (326651)   [VB.NET]

Composite ActiveX Controls Do Not Reactivate When Focus Is on the Child Control (326251) 

PRB: Cannot Add ActiveX Control to Toolbox (320780) 

FIX: "Method Not Found" Error Message When You Add UserControl to Form If UserControl Code Invokes AXControl Methods (316741)   [C#, VB.NET]

BUG: All Controls on Windows Form Disappear If You Remove Reference to One Control from Project (316171)   [VB.NET]

BUG: ActiveX Control Disappears in Windows Forms Designer (312120) 

INFO: ActiveX Control Containers That Support .NET Controls (311334) 

 

ASP and ASP.NET

FIX: References to STA Objects That Are Stored in Session State May Become Corrupted If They Are Called from a Session_End Event (827164) 

FIX: References to STA Objects That Are Stored in Session State May Become Corrupted If They Are Called from a Session_End Event (827163) 

FIX: "COM Object Can Not Be Used" Error Message When You Use an STA COM Object That You Created by Using Server.CreateObject and Stored in Session Scope in a Different Web Page (818612) 

FIX: Severe Performance Issues When You Bind Session State to Threads in ASPCompat Mode (817005) 

FIX: Invalid Object in ASP Session State (810245) 

PRB: "Access Denied" Error Message Occurs When You Impersonate an Account in ASP.NET and Then Call STA COM Components (325791)   [C#, VB]

PRB: Creating STA Components in the Constructor in ASP.NET ASPCOMPAT Mode Negatively Affects Performance (308095)