473,320 Members | 1,719 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,320 software developers and data experts.

How to use .NET Framework in MFC application with VS

I had some codes written with MS VC6 MFC, Now I wanna use some .NET
framework functionality, such as Web Service, Can somebody tell me how to
implement it. Is it posible that an application is written with two diffrent
library concurently, MFC & .NET Framework. Any snippet code & article will
be appreciated!

Thank for your the advanced.

Allen Chang

Nov 17 '05 #1
3 1340
Re-compile using the /clr switch and you should be able to access the Base
Class Library; you might have to make a few fixes though where you might
have used non-standard C++ which VC++ 7.1 won't compile but which VC 6
allowed.

--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com /* MVP tips tricks and essays web site */
http://blog.voidnish.com /* My blog on C++/CLI, MFC, Whidbey, CLR... */
"allen zhang" <zh************@hotmail.com> wrote in message
news:el**************@TK2MSFTNGP10.phx.gbl...
I had some codes written with MS VC6 MFC, Now I wanna use some .NET
framework functionality, such as Web Service, Can somebody tell me how to
implement it. Is it posible that an application is written with two diffrent library concurently, MFC & .NET Framework. Any snippet code & article will
be appreciated!

Thank for your the advanced.

Allen Chang

Nov 17 '05 #2
Nish, thanks. But can you tell me how interoprate MFC with .NET class, for
example, I wanna pass a string variant in .NET to MFC CString variant. In
fact I wanna my MFC application can access .NET web services, my web
services will offer data service for MFC application. I have no any idea
about it.

Thank a lots.

"Nishant S" <ni**@nospam.asianetindia.com> дÈëÓʼþ
news:Os*************@tk2msftngp13.phx.gbl...
Re-compile using the /clr switch and you should be able to access the Base
Class Library; you might have to make a few fixes though where you might
have used non-standard C++ which VC++ 7.1 won't compile but which VC 6
allowed.

--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com /* MVP tips tricks and essays web site */
http://blog.voidnish.com /* My blog on C++/CLI, MFC, Whidbey, CLR... */
"allen zhang" <zh************@hotmail.com> wrote in message
news:el**************@TK2MSFTNGP10.phx.gbl...
I had some codes written with MS VC6 MFC, Now I wanna use some .NET
framework functionality, such as Web Service, Can somebody tell me how to implement it. Is it posible that an application is written with two

diffrent
library concurently, MFC & .NET Framework. Any snippet code & article will be appreciated!

Thank for your the advanced.

Allen Chang


Nov 17 '05 #3
You'd have to do a lot of managed/unmanaged type conversions. There are some
articles on MSDN and web sites like CodeProject that explain how to go about
doing that. There is no easy or general way of doing things. You have to
approach things based on their specific aspects.

I've co-authored a book that talks about such issues (though the book uses
the soon-to-be-obsoleted MC++ syntax)

See : http://www.amazon.com/exec/obidos/AS...620436-5659025

--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com /* MVP tips tricks and essays web site */
http://blog.voidnish.com /* My blog on C++/CLI, MFC, Whidbey, CLR... */
"allen zhang" <zh************@hotmail.com> wrote in message
news:eV**************@TK2MSFTNGP11.phx.gbl...
Nish, thanks. But can you tell me how interoprate MFC with .NET class, for
example, I wanna pass a string variant in .NET to MFC CString variant. In
fact I wanna my MFC application can access .NET web services, my web
services will offer data service for MFC application. I have no any idea
about it.

Thank a lots.

"Nishant S" <ni**@nospam.asianetindia.com> дÈëÓʼþ
news:Os*************@tk2msftngp13.phx.gbl...
Re-compile using the /clr switch and you should be able to access the Base
Class Library; you might have to make a few fixes though where you might
have used non-standard C++ which VC++ 7.1 won't compile but which VC 6
allowed.

--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com /* MVP tips tricks and essays web site */
http://blog.voidnish.com /* My blog on C++/CLI, MFC, Whidbey, CLR... */
"allen zhang" <zh************@hotmail.com> wrote in message
news:el**************@TK2MSFTNGP10.phx.gbl...
I had some codes written with MS VC6 MFC, Now I wanna use some .NET
framework functionality, such as Web Service, Can somebody tell me how

to implement it. Is it posible that an application is written with two

diffrent
library concurently, MFC & .NET Framework. Any snippet code & article will be appreciated!

Thank for your the advanced.

Allen Chang



Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: baylandpark | last post by:
I've written Windows shareware applications using MFC for several years. Now I'm standing at the point to choose a language and platform for a new small application much less than 1MB of footprint....
6
by: Joseph Geretz | last post by:
I recently upgraded my server to Windows 2003. The first thing I noticed is that my sample WebService pages no longer worked. The Invoke test button is missing. This is addresed by the following KB...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
2
by: Mr Utkal Ranjan Pradhan | last post by:
Hi Friends I've developped a vb.net application. Now i want to deploy the application to an Windows 98/Me/2000/XP machine which donot have .NET Framework installed. Now I want to package my...
4
by: bienwell | last post by:
Hi all, I have .NET framework 1.1 and 2.0 installed in the same server. I had some web pages developed in Visual Studio.NET 2003 and some inline code web pages before (framework 1.1) . Now I...
1
by: dinosaur8000 | last post by:
Hi, I'm starting to introduce .NET Framework 2.0 into some of my projects, and I'd like some advice on best practices for running multiple-framework-version code within a web application. My...
3
by: Buddy Home | last post by:
Hello, We have a system that is written in Framework 1.0 and runs under Framework 1.0. It uses the CLR Workstation to load the application. Framework 1.0 would require us to write unmanaged code...
3
dmjpro
by: dmjpro | last post by:
plz send me a good link which can clearify me how the J2EE framework works i want the details information .... plz help thanx
13
by: dancer | last post by:
I have made a new post because when I try to respond to another, I get the error, "Article Rejected -- Ill-formed message id" This is in response to the advice of Juan Libre to install Net...
17
by: Peter Anthony | last post by:
Can the 3.5 version of .NET Framework (currently Beta 2) be installed on pre-Vista machines? Or is it Vista-only? And, why doesn't .NET Framework come pre-installed with the operating system? I...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.