Click here to Skip to main content
15,887,824 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello there

I want to understand that the Visual C++ in visual studio 2010, 2012 is managed or unmanaged.

Simply i want to know is that a Visual C application developed in visual studio 2010 or 2012 will require .net framework or it will be a simple .exe file like Visual C 6.
Posted
Comments
Sergey Alexandrovich Kryukov 8-May-13 1:08am    
Incorrect question! "Simple .EXE" and "requres .NET" are not antonyms.
—SA

1 solution

First, please see my comment to the question.

I assume you want to get some information on the already compiled module (PE file), because finding out what kind of the project you are looking at from the source code is trivial.

Visual C++ allows to develop pure unmanaged executable modules, pure .NET assemblies (written entirely in C++/CLI) and mixed-mode projects. You can find out if managed code is used in a following way: write a .NET application which calls System.Reflection.Assembly.LoadFrom and pass a name of your executable file (by "executable" I mean any PE file, not only *.EXE). This call will throw an exception of the file is not a valid .NET assembly.

Please see:
http://msdn.microsoft.com/en-us/library/1009fa28.aspx[^],
http://en.wikipedia.org/wiki/Reflection_%28programming%29[^],
http://en.wikipedia.org/wiki/Portable_Executable[^].

Read on C++/CLI:
http://en.wikipedia.org/wiki/C%2B%2B/CLI[^],
http://www.ecma-international.org/publications/standards/Ecma-372.htm[^],
http://www.gotw.ca/publications/C++CLIRationale.pdf[^],
http://msdn.microsoft.com/en-us/library/xey702bw.aspx[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900