By leveraging Windows Error Reporting (WER), independent software vendors (ISVs) can use Microsofts existing infrastructure for providing end users with patches and workarounds, a critical aspect of the application life-cycle management.
More articles by Nick Wienholt
Even the best-written C++ applications can crash or hangand end-users' perceptions of the application hinge on how gracefully the application works with the operating system to handle such problems. By registering your applications with Windows Application Recovery and Restart, they can recover gracefully after errors occur.
Correctly managing the release of heap-allocated memory and other resources has been one of the great challenges of C and C++ development for decades. The new shared_ptr class, shipping with Visual Studio 2008 SP1 and Visual Studio 2010, makes dealing with resource management dramatically simpler.
By adopting a messaging based approach to task parallelism, the Asynchronous Agents Library provides a simple model for concurrent programming that avoids the complexity of memory locks.
Visual C++ 2010 includes a number of new features for preventing data inconsistencies due to simultaneous updates of memory locationsa key challenge in parallel development.
Visual C++ 10.0's new Parallel Pattern Library supplies methods to execute multiple processing tasks, across available processing resources, eliminating the headache of manually allocating task execution.
Visual C++ 2010 with many of the new C++ 0x language features including Lambdas. Discover how lambda functions make C++ code easier to read and maintain, and explore the various techniques for writing them ships.
Visual C++ 2010 sees the integration of MSBuild with Visual C++. MSBuild is Microsoft's common build engine and one of its key design goals is the ability to support a high-degree of flexibility in customizing the build process. See how a custom MSBuild task can be built in Visual C++, and how the task can be used to customize the build process of other Visual C++ 2010 projects.
MSBuild is the build platform that Microsoft is using across all developer and related tools moving forward. Visual C++ is the last major compiler offering from Microsoft to move onto the MSBuild platform, with the Visual C++ 2010 release using MSBuild as its native project format. Explore the MSBuild basics from a C++ perspective, and see how it can improve your build process.
C++/CLI has a number of advanced features that make developing and maintaining applications easier. Discover how these allow types to be moved between assemblies without breaking existing application, allow fast and efficient interoperability between native functions, and make it possible to create functions that take a variable number of parameters while still maintaining type safety.
The Visual C++ compiler has a number of switches that control the generation of native and managed instructions within an executable image. Choosing the correct setting is an important consideration for application performance, deployment, and execution, as well as having implications about which development toolkits can be used.
Replacing the cumbersome and confusing Managed Extensions for C++ that shipped with Visual C++ 2002 and 2003, C++/CLI is a standardized set of C++ language extensions that allows developers to write managed code that executes on top of the .NET Framework.
Despite the best documentation, stepping into the actual source code of third-party libraries can be the fastest way to diagnose a difficult bug or determine the state that a component needs to be in before a certain operation can be completed. With a little set-up magic, developers can step into libraries quickly and easily.
Thread debugging can be one of the more difficult debugging exercises for a Visual C++ developer. The Visual Studio 2008 debugger contains a number of improvements that make thread debugging more productive, enabling code issues in multi-threaded applications to be identified and remedied faster.
Effective use of the Visual C++ debugger is one of the easiest ways to increase developer productivity. Program database (PDB) files are one of the key elements in effectively debugging an application, and it is easy to set up Visual Studio to use debug symbols for binary files produced by other developers, including those at Microsoft.
Code is run in a debugger for two main reasons: examining the branches of code that are being executed, and examining data values to determine why the code is behaving in a certain manner. Inspecting data values can be significantly improved by customizing the debug information. See how that can be done in the Visual C++ debugger.
The Visual C++ 2008 Feature Pack incorporates C++ language changes that move C++ closer to the upcoming C++0x standard. The new language elements build on the powerful features of the C++ language, and include support for regular expressions, function objects, and a number of new STL containers as well as many other new features. Review some of the new language features, and see how they can be incorporated into C++ applications.
Hot on the heels of the significant MFC updates that were delivered with the release of Visual Studio 2008, the Visual C++ 2008 Feature Pack significantly boosts the ability of MFC to deliver modern-looking user interfaces that will be familiar to Windows and Office users. Look at these new controls and see how MFC developers can significantly improve their application's look and feel.
For large and complex applications, dealing with the amount of data collected can be difficult. See how the Visual Studio Team System (VSTS) Developer Edition Profiler can do an excellent job of finding performance problems by simply pointing it at an application and allowing it to collect data.
Applications with great performance are a hallmark of C++ programming, and one of the best tools for achieving great application performance is a code profiler. Take a look at the Visual Studio Team System (VSTS) profiler, and see how it can be used to find code bottlenecks and improve performance.
Learn how to rapidly develop applications and add-ins using ATL for Windows CE.
Drill deeper into Mobile Development in C++ and go through the development and debugging of a Windows Mobile 6 application with a focus on MFC.
Try a no-embedded-background-needed introduction into developing Windows Mobile applications in C++. With comprehensive support for smart device development in Visual C++ and great device emulation features in the Windows Mobile SDKs, mobile development is well within the reach of all Visual C++ developers.
The release of Visual Studio 2008 brings support for using the Visual Studio Class Designer with Visual C++ projects. Look at the differences in how the Class Designer works with C++ compared to purely managed languages, and learn about the range of functionality available to C++ developers.
Microsoft Foundation Classes continue to play an important role for C++ developers. Discover how to upgrade an existing application with MFC 9's full support for the Windows Vista look-and-feel.
The conversion between common native types and the equivalent .NET Framework type is a common programming activity for interoperability development in C++. Visual C++ Orcas introduces a light-weight, template-based library for performing this conversion. This article will look at both the use of this library and how it can be extended to add new conversions.
Take a quick look at the upcoming release of the new Visual C++ release slated for release in late 2008—Visual C++ Orcas. The Orcas release builds on the heritage of C++, offering great new features for achieving deep integrating with Windows Vista and better support for interoperating with managed code.
For long-term Visual C++ developers, the CryptoAPI will be a familiar part of your programming toolkit. If you're developing Windows Vista applications, though, you should be applying the new Windows Cryptography API: Next Generation.
Windows Vista introduces a new security concept called User Access Control (UAC), where local administrators have two access tokens—one representing the privileges of a normal user and the other holding the elevated privileges of the local administrator account. Here, you will learn how to properly implement the UAC to provide a rich user experience.
Windows Vista brings tablet-style development to the mainstream by incorporating ink functionality directly into the core operating system. The greater availability of operating system support for ink is complemented by new Vista drivers from digitizer OEMs that provide the same functionality as a full TabletPC device, greatly increasing the potential client-base for ink enabled applications. See how an existing application can work with new forms of input without a major re-design.
Within the new threading and synchronization APIs that Microsoft added to the Windows SDK for Vista, condition variables dramatically simplify the semantics of lock acquisition and management.
Windows Vista allows you to define, secure, and use custom namespaces to prevent malicious applications from denying access to kernel object functionality.
With the rapid increase in parallel computing, correct threading, and synchronization are vitally important to programmers building scalable, high-performance solutions. Explore the new one-time object initialization APIs in Vista from a C++ programmer's perspective.
The way Vista closes applications during operating system shut down has changed from prior Windows versions' approaches. Learn how to provide your users with appropriate notification from the Vista shut down screen.
Fusion is the code name for the .NET Framework sub-system responsible for locating and loading assemblies. It comes in handy for C++ developers who are working with the GAC.
Find out what's become of the Windows Template Library (WTL) since Microsoft released it as an open-source project in 2004. Examine the recent WTL releases and see where WTL fits in the C++ programmer's toolkit.
The application verification features in VSTS Developer Edition help identify errors that are detectable only when an application is running.
In the days before .NET, COM's dependency on the registry and its backward compatibility issues were the Achilles' heel of Win32 development. Learn a technique for deploying your existing COM components without the pain traditionally associated with the registry.
The Windows Vista Event Log offers a much richer experience than today's Event Log functionality. Dive into the code and tools that a C++ developer needs to use the new log.
Native code continues to be the most powerful and flexible mechanism for producing applications that work closely with the host OS. For native development in Vista, get to know the new Windows Event Log features.
While Visual Studio Team System cannot resolve the two intrinsic C++ unit-testing problems (cultural issues related to agile programming and lack of metadata in native C++), it does deliver a polished unit-testing framework for C++.
Visual Studio Team System (VSTS) code annotations enable C++ developers to attach metadata to a method's parameters to explicitly define the correct usage of the method.
The Static Code Analyzer that ships with Visual Studio Team System, Developer Edition can detect common security issues in native C/C++ code.
The security issues with Standard C++ aren't as severe as those of C and the CRT, but a few exploits are possible if you misuse STL and iterators.
The C run-time libraries (CRT) make writing code with buffer overrun vulnerabilities much more likely, but thankfully Visual C++ 2005 provides extended CRT functions that offer the same functionality with a broader safety net.
Drill down deeper into MFC 8.0 with a look at control placement and event handling, the MFC classes used for the Windows Forms integration, and the Windows Presentation Foundation (formerly known as Avalon).
The migration path from MFC to fully native applications is a slow one because Windows Forms lacks many of the advanced features of MFC. See how much easier MFC 8.0 makes Windows Forms integration.
The Configuration Application Block is a viable solution for reloading changed configuration settings, but requires you rework existing applications. Learn how a Visual C++ assembly offers a much easier way.
Changes to the .NET configuration file are not available in the application until a new application domain is started. This behavior can be a real headache when you need to read changed configuration settings. Learn what your options are for achieving this with minimal pain.
STL.NET provides a bridge between the worlds of traditional C++ templates and .NET generics. By allowing C++ developers to leverage their STL skills without precluding interaction with developers using other .NET languages, STL.NET promises the best of both worlds.
In this final installment, I'll wrap up the coverage of what's new in the IDE with a look at Tracepoints, new project types, enhancements to the Server Explorer, and new functionality for creating C++ projects. Lastly, I'll provide answers to some of the questions that readers have posed as the series progressed.
For complex data types, the traditional display offered by debug windows is inadequate. Visual C++ 2005 makes a dramatic upgrade to the variable display, offering a number of improvements in the way you can examine data during a debug session.
The Visual C++ 2005 IDE team made two painful cuts in Beta 2 related to the Class Designer and IDE Click Once support. Read up on these significant changes and find out how C++/CLI programmers can still take advantage of ClickOnce to deploy their applications.
MSBuild is one of the major new features in Visual Studio .NET 2005. Discover the motivation for MSBuild, how it works, and how Visual C++ developers can get their hands on it.
In a continued examination of the new Visual C++ 2005 IDE enhancements, Nick Wienholt looks at the code definition window, changes to class view, and finally one of the big new additions to Visual C++: the class diagram.
Improvements to the IDE are one of the givens in any new release of Visual C++, and hence, they are often overlooked. Take a closer look at some of the new features that the Visual C++ 2005 IDE delivers.
The .NET thread pool's functionality for executing multiple tasks sequentially in a wave or group is insufficient. Luckily, a Visual C++.NET helper method that uses other types within the System.Threading namespace provides this batch-execution model.
In the first two releases of Visual Studio.NET, writing verifiably type-safe code with C++ went from impossible to extremely difficult. Thankfully, Visual C++.NET 2005 offers a much better story on verification than the current compiler.
CodeDom hasn't gotten the same level of attention in C++ circles as VB.NET and C# have, but it is just as relevant there. Nick Wienholt demonstrates why by examining CodeDom from a C++ perspective.
Visual C++.NET supports the automatic detection of stack-based buffer overruns through the use of the /GS compiler switch. Learn why stack-based buffer overruns are so serious, and how /GS and other Visual C++ settings can combat them.