By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,509 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,509 IT Pros & Developers. It's quick & easy.

Calling managed component from MFC application

P: n/a
Hi,

Can some one point some samples of calling managed code from unmanaged code.

Here is basically what I need:
I have an MFC application with several MFC dlls, and I have a new .net
component,
I need to find a way to call the .net component from either the application
or from one
of exist MFC dlls.

TIA,

JoeZ
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
You'll have to use COM interop. tlbexp.exe

"JoeZ" <jo**@yahoo.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
Hi,

Can some one point some samples of calling managed code from unmanaged code.
Here is basically what I need:
I have an MFC application with several MFC dlls, and I have a new .net
component,
I need to find a way to call the .net component from either the application or from one
of exist MFC dlls.

TIA,

JoeZ

Nov 16 '05 #2

P: n/a
That is something definitely I want to skip, if possible. Otherwise I have
to
create a COM component first.
"Pent" <pent> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
You'll have to use COM interop. tlbexp.exe

"JoeZ" <jo**@yahoo.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
Hi,

Can some one point some samples of calling managed code from unmanaged

code.

Here is basically what I need:
I have an MFC application with several MFC dlls, and I have a new .net
component,
I need to find a way to call the .net component from either the

application
or from one
of exist MFC dlls.

TIA,

JoeZ


Nov 16 '05 #3

P: n/a
Hi JoeZ,

try to search Google for articles about hosting the CLR.
CorBindToRuntimeEx() is a key function in this game...

If I've time this coming winter I will create an example to how exaclty do
this from MFC. In my own MFC app I call C# functions as plugins which
manipulate managed objects I create with my MFC app.

Ferdinand.


"JoeZ" <jo**@yahoo.com> wrote in message
news:ui**************@TK2MSFTNGP10.phx.gbl...
That is something definitely I want to skip, if possible. Otherwise I have
to
create a COM component first.
"Pent" <pent> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
You'll have to use COM interop. tlbexp.exe

"JoeZ" <jo**@yahoo.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
Hi,

Can some one point some samples of calling managed code from unmanaged

code.

Here is basically what I need:
I have an MFC application with several MFC dlls, and I have a new .net
component,
I need to find a way to call the .net component from either the

application
or from one
of exist MFC dlls.

TIA,

JoeZ




Nov 16 '05 #4

P: n/a
http://msdn.microsoft.com/msdnmag/is...r/default.aspx

"Ferdinand Oeinck" <ferdo@NO****@home.nl> wrote in message
news:bn**********@news1.tilbu1.nb.home.nl...
Hi JoeZ,

try to search Google for articles about hosting the CLR.
CorBindToRuntimeEx() is a key function in this game...

If I've time this coming winter I will create an example to how exaclty do
this from MFC. In my own MFC app I call C# functions as plugins which
manipulate managed objects I create with my MFC app.

Ferdinand.


"JoeZ" <jo**@yahoo.com> wrote in message
news:ui**************@TK2MSFTNGP10.phx.gbl...
That is something definitely I want to skip, if possible. Otherwise I have to
create a COM component first.
"Pent" <pent> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
You'll have to use COM interop. tlbexp.exe

"JoeZ" <jo**@yahoo.com> wrote in message
news:e6**************@tk2msftngp13.phx.gbl...
> Hi,
>
> Can some one point some samples of calling managed code from unmanaged code.
>
> Here is basically what I need:
> I have an MFC application with several MFC dlls, and I have a new ..net > component,
> I need to find a way to call the .net component from either the
application
> or from one
> of exist MFC dlls.
>
> TIA,
>
> JoeZ
>
>



Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.