Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Source of man or women figure in Text Box 7 100
Slow process to read Excel 15 113
WPF issue with Trigger 2 96
Header Errors LNK2019, LNK1120 - Unresolved Externals 4 97
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now