Managed C Plus Plus
|
- The title of this article is incorrect because of technical limitations. The correct title is Managed C++.
Managed C++ is one of Microsoft's new languages for their .NET initiative. Officially it is called Managed Extensions for C++ by Microsoft, but it is almost universally referred to by its shortened form.
Managed C++ is not a language unto itself, but, as its official name implies, extensions to the C++ language. It adds special syntax additions to the language to leverage the usual .NET language features also found in C# and Visual Basic .NET, such as garbage collection. "Managed" refers to that it is run in, or managed by, the .NET virtual machine that functions as a sandbox for enhanced security in the form of more runtime checks, such as buffer overrun checks. Additionally, applications written in Managed C++ compile to CIL — Common Intermediate Language — and not directly to native CPU instructions like regular C++ applications do.
Managed C++ occupies a unique position in the gallery of .NET languages. It is the only language that can communicate natively with .NET languages (such as C#, VB.NET) and native C++. The other .NET languages can only communicate with C++ code via COM, a rather slow and inefficient method. But since Managed C++ can communicate directly with both languages, it is often used as a "bridge" between the two languages. Therefore, it is often used to write wrappers for C# or C++ code bases which wish to communicate.
The Managed C++ extensions will be significantly revised in Microsoft Visual Studio .NET 2005, with both changes to the syntax and otherwise. This new revision is also to rename Managed C++ to C++/CLI.
See also Managed Extensions for C++
External links
- Microsoft's page on the book Programming with Managed Extensions for Microsoft® Visual C++® .NET (http://www.microsoft.com/mspress/books/5959.asp)