Upload
solomon-gordon
View
219
Download
1
Tags:
Embed Size (px)
Citation preview
DEV 220
What’s New In Visual C++® .NET 2003The Developer’s Power Tool
Kate Gregory
Gregory Consulting
Agenda
UpgradingPerformance ImprovementsSecurity FeaturesStandards ComplianceWindows Forms
Upgrading
Visual C++ 6.0, 2002 to 2003Project files open and convert to 2003
Some code workarounds no longer needed
Continue to write Windows-based applications and components
Target the CLR and incorporate the .NET Framework in new and existing code
…Quake
Performance ImprovementsNew and Improved Optimizations
/G7Pentium 4, AMD Athlon5-10% performance increase on average10-15% performance increase for heavy floating point (FP) variables
/arch:SSE/SSE2Minimal FP performance increase: 2-3%
Whole-program optimizationDead parameter removal
Optimizations
demodemo
Making Software SaferBuffer Overruns Are Expensive
Study: Code Red Costs Study: Code Red Costs
Top $2 billionTop $2 billion
New Apache New Apache worm starts to worm starts to spreadspread
Flaw leaves Linux Flaw leaves Linux computers vulnerablecomputers vulnerable
In Search of the In Search of the World’s Costliest World’s Costliest Computer VirusComputer Virus
(UPnP, Code Red, Apache (UPnP, Code Red, Apache Chunked Encoding Exploit) Chunked Encoding Exploit)
Code Red Virus ‘Most Code Red Virus ‘Most Expensive in History Expensive in History of Internet’ of Internet’
Security FeaturesRuntime Security Checks and /GS
Enhanced compiler feature: /GS/GS not “silver bullet”Buffers are allocated first on the stack to avoid overrunning the localsOS checks compiler-emitted table before jumping to exception handler, avoiding exception handler hijackingDetect overruns that overwrite function return address
/GSBuffer Security Checks
/RTCRuntime Checks
demodemo
Security FeaturesPerformance Impact
Expect less than a 2% degradation.Most applications will not notice. Improvements in optimization outweigh the cost of security checks.Each security check is 9 instructions.
““The perf hit hasn’t shown up for us. There was no test hit The perf hit hasn’t shown up for us. There was no test hit associated with the change. The only cost we’ve had associated with the change. The only cost we’ve had associated with this is getting ourselves to build with /GS.”associated with this is getting ourselves to build with /GS.” – – A Microsoft Internet Information Server (IIS) 6.0 DeveloperA Microsoft Internet Information Server (IIS) 6.0 Developer
Standards ComplianceOverview
75.00%75.00%
80.00%80.00%
85.00%85.00%
90.00%90.00%
95.00%95.00%
100.00%100.00%
6.06.0 20022002 20032003
98.11%98.11%
87.63%87.63%
81.03%81.03%
Standards ComplianceThe Problem Areas2.2 Unicode identifiers
3.4.2 Full Koenig lookup
8.5.1 Empty aggregate initialization
9.8 Symbol lookup for local member functions
11.4 Friends in class templates (also 14.5.3)
13.3.1.1.2 Implicit invocation of ptr-to-func conversions
13.3.3.2 Ranking of derived to base conversions
14 Export keyword
14.1 Non-type template parameters (also 14.3.2)
14.5.2 User-defined conversion templates
14.5.4 Partial specialization of class templates
14.5.5.2 Partial ordering of function templates
14.6 Dependent name lookup
14.7.1 Nested classes in class templates
14.7.3 Explicit specialization of member templates
15.4 Exception specifications
15.5.2 The unexpected() function
ANSI / ISO C++Standards Conformance
demodemo
Standards ComplianceFinal Comments
98% compliance means Visual C++ .NET 2003 is one of the most compliant compilers available
Visual C++ .NET 2003 is targeted at systems and performance-oriented development on Microsoft® Windows® and the .NET Framework
Full power of advanced templates
Work with key third-party libraries like Boost and Loki
Windows FormsRAD for C++
Changing properties changes codeNon-UI controls placed in separate trayVisual inheritanceIn-place menu editingVisual tab order editingAnchor, dock, AutoScroll, locked propertiesResize multiple controls
Windows Forms
demodemo
SummaryWhat Users Are Saying
“… Whole Program Optimization is ‘efficient’. The last time I tried it on Mathematica – using Intel’s C compiler – it churned for eight hours, ran out of virtual memory, and crashed. In VS .NET 2003, it is relatively speedy.” - David Librik, Mathematica
“Without MC++, we could not support .NET in Office. We are not rewriting Word in C#, and we are not using COM interop to talk between native and managed code when such a simple and straightforward way to do this exists in MC++. All of our code is in C and C++, why would we want to throw any of it away? We will continue to use and extend the code and skills we already have.” - Matt Ruhlen, Microsoft Office
“C++ increasingly means Visual C++” - Scott Meyers
Summary
Continue to write for native WindowsFull access to the .NET FrameworkYour skills and investments move forwardVisual C++ .NET 2003 continues forward as the high-end developer tool
Community Resources
Community Resourceshttp://www.microsoft.com/communities/default.mspx
Most Valuable Professional (MVP)http://www.mvp.support.microsoft.com/
NewsgroupsConverse online with Microsoft Newsgroups, including Worldwidehttp://www.microsoft.com/communities/newsgroups/default.mspx
User GroupsMeet and learn with your peershttp://www.microsoft.com/communities/usergroups/default.mspx
Suggested Reading And Resources
The tools you need to put technology to work!The tools you need to put technology to work!
TITLETITLE AvailableAvailable
Programming with Managed Programming with Managed Extensions for Microsoft® Visual Extensions for Microsoft® Visual C++® .NET--Version 2003: 0-7356-C++® .NET--Version 2003: 0-7356-1774-01774-0
TodayToday
Microsoft® Visual C++® .NET Microsoft® Visual C++® .NET Language: 0-7356-1553-5Language: 0-7356-1553-5 TodayToday
Microsoft Press books are 20% off at the TechEd Bookstore
Also buy any TWO Microsoft Press books and get a FREE T-Shirt
evaluationsevaluations
© 2003 Microsoft Corporation. All rights reserved.© 2003 Microsoft Corporation. All rights reserved.Microsoft, Visual C++, Visual Studio, the Visual Studio logo, Windows, the Windows logo, and SQL Server are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.