Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5928519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:18:05+00:00 2026-05-22T14:18:05+00:00

I have an old MFC app written in Visual Studio 6. This will at

  • 0

I have an old MFC app written in Visual Studio 6. This will at some point be rewritten in C# .NET. However, before then I have to write a couple of new Windows services for the existing application. The others were written in ATL. What I would prefer to do is write these new services in C# .NET so that when the rest of the application is rewritten, these don’t need to be.

Is it going to be possible to call the interfaces on the libraries hosted in a .NET windows service from the old application? If so, could you please explain how.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:18:06+00:00Added an answer on May 22, 2026 at 2:18 pm

    Absolutely. You’re looking for a feature of .NET called COM-Interop.

    http://msdn.microsoft.com/en-us/library/kew41ycz%28v=vs.71%29.aspx

    http://msdn.microsoft.com/en-us/magazine/cc163494.aspx

    The second link has an ATL example.

    EDIT:
    Based on your feedback in the comments, let me expand on this…

    Ah – you’re right about the sample on that page.

    The first link is really where you want to start for all the details. If you follow the links, you’ll find this page:

    “Exposing .NET Framework Components to COM”
    http://msdn.microsoft.com/en-us/library/zsfww439%28v=vs.71%29.aspx

    Essentially, it’s just a matter of applying a series of attributes to your classes and properties, and then generating the appropriate registry entries on the client machine (which .NET has a tool to do – see: http://msdn.microsoft.com/en-us/library/bctyca52%28v=vs.71%29.aspx)

    I’ve done this several times myself for .NET projects people needed to call from VC++ and/or VB6.

    Some other links that might be of interest:

    http://www.codeproject.com/KB/COM/nettocom.aspx <– Perfect example of what you’re trying to do.

    http://www.codeproject.com/KB/COM/Universal_CCW.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an old MFC utility written with VS2008 project. We have used this
I have old Delphi application. This app takes session key from server, do some
I have some old code that uses qsort to sort an MFC CArray of
When running an old MFC application in Visual Studio's debugger I've seen a lot
I have inherited an old C++ (MFC) project and will have to add new
I'm writing a .NET wrapper around an old MFC-based library we have. It's based
I have an old web app where Javascript is used to validate some dates.
I have some old files that need to point to new files - the
In good old MFC, the DDX routines would have built in validation for form
I have successfully upgraded an MFC application which was compiled with an old version

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.