Solved

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

Posted on 2003-10-28
5
525 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

825 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