Academic Tutorials



English | French | Portugese | German | Italian
Home Advertise Payments Recommended Websites Interview Questions FAQs
News Source Codes E-Books Downloads Jobs Web Hosting
Chats

VC++
VC++ Introduction
VC++ What's New
VC++ Supported Platforms
Visual C++ Settings
VC++ Breaking Changes
Visual C++ Walkthroughs
Visual C++ Editions
VC++ Project Templates
Visual C++ Guided Tour
VC++ Creating Command-Line Applications
VC++ Windows Applications
VC++ Reusable Code
VC++ Porting
VC++ Unix Users
VC++ Upgrade Wizard
VC++ Migration Primer
VC++ Managed Types
VC++ Member Declarations
VC++ Conversion Operators
VC++ Interface Member
VC++ Value Types
VC++ Boxed Value
VC++ General Language
VC++ Common Programming
VC++ Database Support
VC++ MFC Database Classes
VC++ Record
VC++ Record View
VC++ OLE DB Programming

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
HLML
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
CVS
Python
Apple Script
PL/SQL Tutorial
SQL Server
PHP
.NET (dotnet)
Microsoft.Net
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
VC++
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Matlab
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Graphics
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
SEO
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Eclipse
J2ME
JBOSS
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Cobol
Assembly Language
Mainframe
Forth Programming
Lisp Programming
Pascal
Delphi
Fortran
OOPs
Data Warehousing
CGI Programming
Emacs Tutorial
Gnome
ILU
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Oracle
MySQL
Operating System
BSD
Symbian
Unix
Internet
IP-Masquerading
IPC
MIDI
Software Testing
Testing
Firewalls
SAP Module
ERP
ABAP
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Netweaver
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Accounting
Financial Accounting
Managerial Accounting
Network Sites


How to: Upgrade Wizard-Generated Managed Extensions for C++ Code


Previoushome Next






How to: Upgrade Wizard-Generated Managed Extensions for C++ Code
Visual Studio wizards generate code in your source files, either when the project is created, or when functionality is added via a code wizard.
A D V E R T I S E M E N T

When upgrading a project, it is usually necessary to upgrade the wizard-generated code as well. For Microsoft Visual C++ 2005, a common scenario is upgrading code written with Managed Extensions for C++ to use new Visual C++ language features instead.




Upgrading Managed Extensions for C++

To upgrade code that uses Managed Extensions C++ code:

  • Convert the code manually, using the Managed Extensions for C++ Syntax Upgrade Checklist.
  • Use Visual C++ 2008 to generate a new project of the same type, then either move your existing code into the new project or cut-and-paste the wizard-generated portions of the new project into the existing one.

For the most part, upgrading from Managed Extensions for C++ is just a matter of changing the syntax, but there are some semantic differences.

Managed Extensions for C++ Syntax Upgrade Checklist
For Visual C++ 2005, Visual C++ includes features for targeting virtual machines with garbage collection, such as the .NET Framework. For Visual C++ 2008, support for Managed Extensions for C++ is deprecated, and might be removed entirely in a future release.

Code using Managed Extensions for C++ can still be compiled with /clr:oldSyntax. See /clr (Common Language Runtime Compilation) for more information For more information on using the new syntax, see:

  • .NET Programming Guide
  • How To: Migrate to /clr
  • C++/CLI Migration Primer
  • Language Features for Targeting the CLR

This topic lists the syntactic differences between Managed Extensions for C++ and the new Visual C++ syntax.




To Update Managed Extensions for C++ Code
  • Remove #using . (This assembly is now referenced by default.)
  • Replace __gc class with ref class.
  • Replace __gc struct with ref struct.
  • Replace __value class with value class.
  • Replace __value struct with value struct.
  • Remove default constructors from value classes. (Default constructors for value types are allowed in Managed Extensions for C++, but the nature of the CLR prevents them from being called reliably, so this feature has been removed.)

For more information about reference and value types, see Classes and Structs (Managed).

  • Replace __gc __interface with interface class.

For more information about the interface keyword, see interface class.

  • Replace __abstract with abstract, and move it after the class name. For more information, see abstract (Visual C++).
  • Replace __sealed with sealed, and move it after the class name. For more information, see sealed.
  • Replace __property with property, combine the get and set methods into a single property block, and remove the trailing underbar/name suffix from these accessors. For simple properties, the accessors need not be defined explicitly. The syntax for indexed properties requires bracket pairs after the property type. For more information, see, How to: Use Simple Properties and How to: Use Indexed Properties.
  • Replace __event with event (Visual C++).
  • Replace __value enum with enum class.
  • Replace pointers to reference types followed (defined with __gc*) with ^. For more information, see ^ (Handle to Object on Managed Heap).
  • Replace pointers to values types that potentially live in the garbage collected heap with interior_ptr.
  • Replace pointers declared with __pin with instances of pin_ptr, unless a whole object is being pinned, in which case use interior_ptr, and then use pin_ptr on the interior pointer. For Visual C++ 2005, this template is defined in the cli Namespace.
  • Replace new with gcnew.
  • Replace 0 or null with nullptr when used to indicate that a pointer or handle into the garbage collected heap does not indicate an object and when using comparisons to check pointers and handles.
  • Update garbage-collected arrays declared with __gc[] to use the array (Visual C++) type. For Visual C++ 2005, this template is defined in the cli Namespace.
  • Remove all instances of __box. For more information, see Implicit Boxing.
  • Remove the "S" prefix from string literals (the compiler now determines if a string is literal based on the context in which it is used.)
  • Replace the explicit declaration and usage of overloaded operators required in Managed Extensions for C++ (such as op_Addition, op_Subtraction) with the traditional C++ syntax. For more information, see User-Defined Operators and Operator Overloading.
  • Update conversion operators (which use op_Implicit and op_Explicit in Managed Extensions for C++ syntax.) For more information, see User-Defined Conversions.
  • Replace __typeof with typeid.
  • Replace __try_cast with safe_cast. For Visual C++ 2005, this template is defined in the cli Namespace.
  • If you were signing your assembly (also known as giving your assembly a strong name) with the CLR's assembly-signing attributes, you should remove those attributes from your code and instead use the assembly-signing linker options. For more information, see Strong Name Assemblies (Assembly Signing).


Be the first one to comment on this page.




  VC++ eBooks

No eBooks on VC++ could be found as of now.

 
 VC++ FAQs
More Links » »
 
 VC++ Interview Questions
More Links » »
 
 VC++ Articles
More Links » »
 
 VC++ News
More Links » »
 
 VC++ Jobs
More Links » »

Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previoushome Next

Keywords: bsd programming language, bsd language programming tutorial pdf, history of bsd programming, basic bsd programming, bsd band satellite programming, syntax use in bsd programming, bsd programming software download, turbo bsd programming, bsd programming code, learn bsd programming

HTML Quizzes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
HLML Quiz
XML Quizzes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizzes
JavaScript Quiz
VBScript Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizzes
ASP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
PL/SQL Quiz
SQL Server Quiz
PHP Quiz
.NET (dotnet) Quizzes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
VC++ Quiz
Multimedia Quizzes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building Quizzes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizzes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
JBOSS Quiz
Programming Langauges Quizzes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
OOPs Quiz
Data Warehousing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU Quiz
Soft Skills Quizzes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz
Database Quizzes
Oracle Quiz
MySQL Quiz
Operating System Quizzes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
MIDI Quiz
Software Testing Quizzes
Testing Quiz
Firewalls Quiz
SAP Module Quizzes
ERP Quiz
ABAP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizzes
Corba Quiz
Networking Quiz
Microsoft Office Quizzes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft Front Page Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizzes
Financial Accounting Quiz
Managerial Accounting Quiz
Testimonials | Contact Us | Link to Us | Site Map
Copyright 2008. Academic Tutorials.com. All rights reserved Privacy Policies | About Us
Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Interview Questions | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Jobs Assist | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Webhosting in India | Dedicated Server in India | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Tests World | The Galz | Top Masala | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World
Copyright 2003-2017 Vyom Technosoft Pvt. Ltd., All Rights Reserved.