32f939bba55bf1003782ec5da93b431e.ppt
- Количество слайдов: 21
DEV 220 What’s New In Visual C++®. NET 2003 The Developer’s Power Tool Kate Gregory Consulting
Agenda Upgrading Performance Improvements Security Features Standards Compliance Windows Forms
Upgrading Visual C++ 6. 0, 2002 to 2003 Project 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 Improvements New and Improved Optimizations /G 7 Pentium 4, AMD Athlon 5 -10% performance increase on average 10 -15% performance increase for heavy floating point (FP) variables /arch: SSE/SSE 2 Minimal FP performance increase: 2 -3% Whole-program optimization Dead parameter removal
demo Optimizations
Making Software Safer Buffer Overruns Are Expensive Code Red Virus ‘Most Expensive in History of Internet’ sts e Red Co od Study: C illion Top $2 b Flaw leave s Linux computer s vulnerab le In Search of the World’s Costliest Computer Virus (UPn. P, Code Red, Apache Chunked Encoding Exploit) New Apache worm starts to spread
Security Features Runtime Security Checks and /GS Enhanced compiler feature: /GS not “silver bullet” Buffers are allocated first on the stack to avoid overrunning the locals OS checks compiler-emitted table before jumping to exception handler, avoiding exception handler hijacking Detect overruns that overwrite function return address
demo /GS Buffer Security Checks /RTC Runtime Checks
Security Features Performance Impact Expect less than a 2% degradation. Most applications will 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 associated with the change. The only cost we’ve had associated with this is getting ourselves to build with /GS. ” – A Microsoft Internet Information Server (IIS) 6. 0 Developer
Standards Compliance Overview 100. 00% 98. 11% 95. 00% 90. 00% 87. 63% 85. 00% 81. 03% 80. 00% 75. 00% 6. 0 2002 2003
Standards Compliance The Problem Areas 2. 2 Unicode identifiers 3. 4. 2 Full Koenig lookup 14. 5. 2 User-defined conversion templates 8. 5. 1 Empty aggregate initialization 14. 5. 4 Partial specialization of class templates 9. 8 Symbol lookup for local member functions 14. 5. 5. 2 Partial ordering of function templates 11. 4 Friends in class templates (also 14. 5. 3) 14. 6 Dependent name lookup 13. 3. 1. 1. 2 Implicit invocation of ptrto-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. 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
demo ANSI / ISO C++ Standards Conformance
Standards Compliance Final 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 Forms RAD for C++ Changing properties changes code Non-UI controls placed in separate tray Visual inheritance In-place menu editing Visual tab order editing Anchor, dock, Auto. Scroll, locked properties Resize multiple controls
demo Windows Forms
Summary What 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 Windows Full access to the. NET Framework Your skills and investments move forward Visual C++. NET 2003 continues forward as the high-end developer tool
Community Resources http: //www. microsoft. com/communities/default. mspx Most Valuable Professional (MVP) http: //www. mvp. support. microsoft. com/ Newsgroups Converse online with Microsoft Newsgroups, including Worldwide http: //www. microsoft. com/communities/newsgroups/default. mspx User Groups Meet and learn with your peers http: //www. microsoft. com/communities/usergroups/default. mspx
Suggested Reading And Resources The tools you need to put technology to work! TITLE Programming with Managed Extensions for Microsoft® Visual C++®. NET--Version 2003: 0 -73561774 -0 Microsoft® Visual C++®. NET Language: 0 -7356 -1553 -5 Available Today Microsoft Press books are 20% off at the Tech. Ed Bookstore Also buy any TWO Microsoft Press books and get a FREE T-Shirt
evaluations
© 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.


