.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Inquiry on .NET COM interop compatibility

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :.NET Framework

Hi all,

I have a WinForm .NET 3.5 library (VS2008 project), which i would like to use in a MFC 7.1 application (VS2003 project).

If I export .NET library as COM server and interop with legacy MFC 7.1 application, will there be a .NET runtime compatibility issue?

I'm really new to interop and COM, and want to know if it is feasible or not.

If COM is the wrong direction, what would be the proper way?

Thanks in advance!


Best Regards,


View Complete Post

More Related Resource Links

Kepp compatibility of com-interop called by vb6 (ComVisible and Guid not working)



We have a vb6 application that calls a c# com interop.
In our new version we have added a new function to the com interop, and now the vb6 app is failing with "Run-time error 430 class does not support Automation or does not support expected interface"

the code looks like:

[ComVisible(true), Guid("682D4AF6-E607-3112-87B2-B7B1A58D2618")]
public interface IMyInterface

        string NewFunction();

[ComVisible(true), Guid("7E99EAC4-C7FA-4e0e-9996-F4500E17AF69")]
public class MyClass:IMyInterface

 public string NewFunction() {...}

when comparing old and new IDL files it show that the Guids of the class are the same:
        custom({0F21F359-AB84-41E8-9A78-36D110E6D2F9}, "MyCompany.MyServiceClient.MyClass")
    coclass SecureAssets {

COM Interop in C# 4.0

Let's take a bit of a recap of how far we've come. We've chatted about dynamic binding in C# and how that all plays in with the DLR, and about named and optional arguments and how they change the way methods are bound. The only other major piece in C# 4.0 is this notion of COM interop. We chatted about how dynamic really is a gateway to interop with different object models and languages (ie interacting with dynamic languages, dynamic object models, javascript objects, HTML DOM etc), but in C# 4.0, we want to go a bit further and provide you a few more tools to help make your interop life much easier.

Excel Interop Save as



I want to Save excel workbook using Excel interop in 97-2003 format. Currently I have Office 2007 installed on my machine.

below is the code I am using.

_book.SaveAs("New.xls", Excel.XlFileFormat.xlWorkbookDefault, Missing.Value, Missing.Value, false, false, Excel.XlSaveAsAccessMode.xlNoChange, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);

The solution is little urgent.


Mobile beginner's inquiry


I've developed web applictions in VB in VS2005 pro and want to get started on developing mobile applications in VB now that I've upgraded to VS2010 pro.  It's proving to be more difficult to get off the ground than I expected.  It would seem that there have been several toolkits for developing mobile applications since NET 2.0 -- some obsolete -- and the web refences I've been going through seem to be a mishmash of broken links, circular references and dead ends.

When I click on toolbox -> choose toolbox items, all of the system.web.ui.mobilecontrols are there.  But they never turn up in my toolbox.  And I can't find a way of beginning a  mobile website project, either.  Nor can I find any examples of mobile ASP.NET development in either the samples included with VS2010 or online at http://msdn.microsoft.com/en-us/vstudio/dd238515.aspx

My needs are simple: can somebody tell me what additions or configuration changes I need to make to prepare my VS2010 setup for working with ASP.NET 4.0 mobile controls?  And once this is there any good tutorial for learning mobile website develpment that doesn't involve contracting with a third party?  How about a good book for learning the CURRENT tec

Reporting Services SQL 2005 .Net 4 compatibility?


I've been working on my first asp.net application and for the most part it's been pretty smooth.  Right now I'm having trouble getting reporting services working under SQL Server 2005.  I developed the site with Visual Studio 2010 and didn't think about any of the .Net 4.0 compatibility issues that have arisen.  I'm having no problems with the site communicating with SQL Server 2005 for the regular database stuff.  The only problem I'm having is with setting up Reporting Services.  I have the .Net 4.0 framework installed on the server, however Reporting Services is still using 2.x.  I'm not sure if this is a problem with SSRS or with IIS.  When i go to localhost/Reports it's reading my web.config for my application and throwing an error: "Parser Error Message: Unrecognized attribute 'targetFramework'."  This is referring to a line in my web.config where targetFramework is set to 4.0.

Software that I'm using:

  • Visual Studio 2010
  • SQL Server 2005 Standard
  • IIS 7.0
  • .Net 4.0

Any suggestions?  

.NET Interop: Automate Acceptance Testing With IronRuby


Acceptance testing verifies that the system under development meets the customer's requirements. Learn the benefits here.

Ben Hall

MSDN Magazine March 2009

.NET Interop: Getting Started With IronRuby And RSpec, Part 1


See how IronRuby lets you employ the straightforward Ruby language to create acceptance tests that interoperate with .NET-compliant code.

Ben Hall

MSDN Magazine February 2009

Visual Studio OBA Tools: Simplify OBA Development With Interop API Extensions


To introduce you to VSTO Power Tools Office interop API extensions, we'll walk through the development of an application that automates Outlook, Excel, and Word.

Andrew Whitechapel, Phillip Hoff, and Vladimir Morozov

MSDN Magazine December 2008

Interop: Connect To Mainframe Apps With BizTalk Adapters and .NET


If you have a significant investment in legacy COBOL applications running on mainframes, you need the BizTalk Adapters for Host Integration Server .

Bashar "Bash" Badawi

MSDN Magazine December 2007

CLR Inside Out: Introduction to COM Interop


The CLR allows seamless interactions between Microsoft .NET applications and COM. But how, exactly? The CLR team knows.

Thottam R. Sriram

MSDN Magazine January 2007

CLR Inside Out: Ensuring .NET Framework 2.0 Compatibility


If we learned only one thing about compatibility in the past few years, it is that compatibility is much more than avoiding breaking changes. On the Microsoft®. NET Framework and Visual Studio® teams, we do our part to ensure that the products we build are stable platforms that developers can truly rely on.

Jesse Kaplan

MSDN Magazine March 2006

Interop: Get Seamless .NET Exception Logging From COM Clients Without Modifying Your Code


Using .NET objects from ASP can help you gain experience with the .NET Framework before migrating to ASP.NET. Your ASP pages will make use of the new .NET components through COM-callable wrappers (CCW). But how will you handle exceptions? This article fills you in.

Matt Adamson

MSDN Magazine January 2005

.NET Remoting: Create a Custom Marshaling Implementation Using .NET Remoting and COM Interop


The .NET Framework offers several methods for customizing the presentation of native .NET and COM object types. One such technique, custom marshaling, refers to the notion of specializing object type presentations. There are times, like when a legacy COM component needs to implement a new interface or when you need to make calls across process or machine boundaries, when custom marshaling saves the day. Elements of COM Interop permit the customizing of COM types while .NET Remoting offers the developer the ability to tailor native .NET types. This article examines these techniques.

Jim Sievert

MSDN Magazine September 2003

DCOM Interop: Generate Custom Managed C++ Wrappers for Easier COM Interoperation Using DCOMSuds


Now that you're writing managed code, you'll certainly want to use your existing COM components, but you can't simply call them directly. Instead, you have to wrap the COM component in a runtime-callable wrapper that acts as a proxy between the component and your managed code. While the CLR provides wrapper classes for this purpose, there will be times when you'll want custom objects to wrap your COM components. One way to get the low-level access you need to precisely control resource cleanup, pass security information, and get access to CLR features is to write your own wrapper class in managed C++. This article shows you how.

Vishwas Lele

MSDN Magazine August 2003

.NET Interop: Get Ready for Microsoft .NET by Using Wrappers to Interact with COM-based Applications


Very soon, the development of Microsoft .NET applications will require interaction between those apps and existing COM components on both the client and the server. The .NET Framework has made provisions for this interaction by implementing various wrappers for COM objects to allow exposure of their properties and methods to .NET components. These wrappers will make it easy to make the connection between COM and .NET. After discussing wrappers, this article discusses other ways for .NET components to take part in COM+ transactions. To top off the tutorial on the interoperation of COM and .NET, the article discusses how ActiveX containers can host .NET controls, and how .NET containers can host ActiveX controls.

David S. Platt

MSDN Magazine August 2001

Info about Silverlight compatibility

Where is Silverlight compatibility across other platforms, such as Mac, Linux and mobile devices. Does it still lag behind the current Windows builds?   Timothy Johnson www.wearefound.com
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend