473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Calling managed component from MFC application

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
4 3672
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: b.bardugo | last post by:
Hi all, I have a C# user control (a little app I made to display video). In this code I am using a third party .dll, which is written in C++ (un-managed). I am tring to put this control on a web...
2
by: Badrinath Mohan | last post by:
Hi All I am accessing a COM component using C#. When i access it through the standalone c# application it works fine.But when i call it using ASP .net application its not working . For example ...
1
by: Jesse McGrew | last post by:
Hi all, I'm trying to make a plugin DLL for a third-party application, using VC++ .NET 2003. This DLL acts as a bridge between the C++ plugin API of the application, and my actual plugin code...
6
by: William F. Kinsley | last post by:
I am thinking of porting an existing MFC application to MC++ and I have created a simple MFC application to test the environment. My sample MFC application is compilied with the /clr switch. I...
3
by: Usman Jamil | last post by:
Hi I've a dotnet application in C#. I need to call a COM method from it. The com component is written in VC++. One method is to add a refrence to that COM component in my dotnet application that...
3
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I'm trying to specify the requirement from unmanaged DLL component that will be used by a managed application written in C#. The unmanaged DLL is implementing some kind of algorithm for defect...
3
by: Klaus | last post by:
Hi, I have an existing VC 6 MFC application which communicates asynchronly with a VC 2005 managed code dll. I use an unmanaged base class with virtual functions to access methods in the MFC...
1
by: ashish | last post by:
HI, I have some question about using unmanaged 32 bit COM (C++) dll with C# . We use Visual Studio 2005 to develop this C# dll on 64 bit machine. (1) When I call the C# dll built with ANY...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.