Link to home
Start Free TrialLog in
Avatar of Olga000
Olga000

asked on

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

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
Avatar of GloomyFriar
GloomyFriar

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.
...

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?
ASKER CERTIFIED SOLUTION
Avatar of GloomyFriar
GloomyFriar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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