Solved

How to call managed C++ dll methods from unmanaged MFC application?

Posted on 2003-10-28
5
526 Views
Last Modified: 2013-12-03
Hi Experts!

I am planning to dedvelop a new component (dll) for my application using managed C++ code and call this component’s methods from my old MFC application. I found a lot of examples how to call unmanaged code from managed, by not opposite way. I am wondering if it is possible to and how it could be done.

Thank you for help,
Olga
0
Comment
Question by:Olga000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9635924
http://www.csharphelp.com/archives/archive63.html
...
In this 2 parts we covered calling DLL libraries from .NET code.
What about:
* Call COM servers
* Call managed components from unmanaged code.
...

0
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9635941
http://lists.ximian.com/archives/public/mono-list/2002-September/008117.html
> > (3) Are there any other (possibly Mono-specific) mechanisms to call from
> > unmanaged to managed code, assuming that both are running within a single
> > process?
>
> See the document mono/docs/embedding-api, it describes a mechanism to
> call methods in the CIL world from the C world

This is exactly what I was looking for, thank you. Is it possible to estimate
the overhead of mono_runtime_invoke() compared to a normal function call?
0
 
LVL 6

Accepted Solution

by:
GloomyFriar earned 250 total points
ID: 9635967
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10546262
No comment has been added lately, so it's time to clean up this question.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: GloomyFriar {http:#9635967}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question