Re: Mixing and MFC 2003 app with .NET 2005
you can declare some managed events in your CLR 1.x project, reference your
CLR 1.x project in a CLR 2.0 project, and hook the events in your .CLR 2.0
project. In this way if you want to call some CLR 2.0 code, just fire those
events and put your CLR 2.0 code in event handlers.
You may need to change| the application configuration file (supportedRuntime
element) to specify that the CLR 2.0 should be loaded, if your application
is compiled to run against CLR 1.x.
The other way is to expose your .Net 2.0 component via a COM interface. You
still need to specify the CLR version to be 2.0.
--
Sheng Jiang
Microsoft MVP in VC++
<Miesha.James@gmail.com> wrote in message
news:1184680261.566211.13720@z28g2000prd.googlegroups.com...
Hello,
I have an MFC project written in Visual Studio 2003 and I have to add
the use of a component written in c++ .NET 2005. The .NET component
is formatted as a dll file and when I try to add the statement #using
<sample.dll>; I get a fatal error C1192. Does anyone know what may
be the cause of this and how to fix the problem?
I know that it would be a lot simplier with just porting the MFC
project into Visual Studio 2005, but unfortunately there lies other
complications and my boss would prefer to keep the project as is.
Thanks in advance.
MJ