Question: > 
> **Possible Duplicate:**   
> 
> [What is the difference between Managed C++ and C++/CLI?](https://stackoverflow.com/questions/2443811/what-is-the-difference-between-managed-c-and-c-cli)   
> 
> [What is CLI/C++ exactly? How does it differ to 'normal' c++?](https://stackoverflow.com/questions/6399493/what-is-cli-c-exactly-how-does-it-differ-to-normal-c)
> 
> 
> 

I am in doubt of distinguishing between C++ and C++.NET.

Is that right C++ is unmanaged code and C++.NET is managed code?

I need to program for a project in C++. For better building the GUI, I would prefer to use C++.NET.

I also have another plain C++ library (unmanaged C++ DLL file), will it be possible to use it as a normal DLL library in the C++.NET project?

Answer: 
> 
> Is that right C++ is unmanaged code and C++.NET is managed code.
> 
> 
> 

There's no such thing as "C++.NET". There's C++/CLI, which is basically C++ with Microsoft extensions that allow you to write code targeting the .NET framework. C++/CLI code compiles to CLR bytecode, and runs on a virtual machine just like C#. I'll assume you're actually talking about C++/CLI.

With respect to that, one can say standard C++ is unmanaged and C++/CLI is managed, but that's very much Microsoft terminology. You'll never see the term "unmanaged" used this way when talking about standard C++ unless in comparison with C++/CLI.

Both standard C++ and C++/CLI can be compiled by the same Visual C++ compiler. The former is the default on VC++ compilers, while a compiler switch is needed to make it compile in latter mode.

> 
> I need to program for a project in C++. For better building the GUI, I
>  would prefer to use C++.NET.
> 
> 
> 

You can build GUI programs in C++ just as well as C++/CLI. It's just harder because there isn't a standard library in standard C++ for building GUI like the .NET framework has, but there are lots of projects out there like [Qt](http://qt.nokia.com/products/) and [wxWidgets](http://www.wxwidgets.org/) which provide a C++ GUI framework.

> 
> I also have another plain C++ library (unmanaged C++ dll), will it be
>  possible to use it as a normal dll library in the C++.NET project?
> 
> 
> 

Yes. It might take some extra work to deal with the different standard C++ data types and .NET data types, but you can certainly make it work.
* Yes, C++ is unmanaged code and C++/CLI is managed.
* Yes, you can use your unmanaged C++ DLL in your C++/CLI project. But you have to write a wrapper for that. That means you have to define the unmanaged methods you want to access in your C++/CLI project.

Example:

```
using System.Runtime.InteropServices;

[DllImport("YourDLLName")]
public static extern void UnmanagedMethodName(string parameter1);

```