none
I'd like to load library.. RRS feed

  • Question

  • Hi,

    I'd like to load "C# library" to "VC++ 6.0 MFC".

    The library contains some "User Control"s which are based on WinForm.

    Please give me the way how to load "Library".

    p.s I CAN load library using VC++.NET. but I CAN'T do that using VC++6.0

    Friday, August 30, 2013 8:02 AM

All replies

  • Short of making the C# control an ActiveX control that can then be hosted in an ActiveX container I don't think you're going to get that to work properly.  MFC doesn't understand .NET and vice versa so there has to be some handshaking involved.  MFC already knows ActiveX and C# can implement ActiveX controls so it is the easiest (albeit long) approach.  If you want to go that route then check out MSDN and the various programming sites for how to create an ActiveX control in C#. 

    Michael Taylor
    http://msmvps.com/blogs/p3net

    Friday, August 30, 2013 7:28 PM
    Moderator
  • Hello,

    Thanks for your posting.

    From your description,I think that Tadejong's view is correct. I find an article that is related to this topic,you can try to refer this article:

    http://www.codeproject.com/Articles/7859/Building-COM-Objects-in-C

    Hope these help.


    Lilia Gong <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Saturday, August 31, 2013 3:07 PM
    Moderator
  • Thank you for your kindly answer.

    I've already read these articles.

    http://www.codeproject.com/Articles/12673/Calling-Managed-NET-C-COM-Objects-from-Unmanaged-C

    http://stpetrus27.wordpress.com/2010/02/28/mfc-clr-windows-form-user-control-in-mfc-dialog/

    and so on.

    Some articles focus on "Calling C# Method" such as first link that I've written.

    But I really want to know how I can create "User Control" which made in C# not only MFC.NET but also MFC6.0.

    Thanks.


    Tuesday, September 3, 2013 2:00 AM