A reliable application is one that behaves exactly as its user expects it to behave. Windows Vista offers an extensive set of new APIs and developer services on the Web to make your applications predictable and manageable to end users, and to diagnose them when they are not.
A major tenet of the Windows Vista experience is that the system and applications "just work." Users are expecting applications that are stable and easy to install and use. A stable application is one that avoids hangs, crashes, and reboots. Windows Vista provides developers with a set of tools for creating applications that will help optimize system stability and performance.
Developers using Windows Vista can help protect users against losing data or work because of a software problem or system instability. Windows Vista provides a well-defined mechanism for all user-mode applications to register themselves as restart-able and provide document recovery interfaces. Used in conjunction with the Windows Vista Restart Manager technology, Windows Vista application and data recovery mechanisms make application installation and upgrading less invasive: preserving the running state of applications that need to be interrupted for system reconfiguration. Improved I/O cancellation support in Windows Vista increases application responsiveness. In addition to these mechanisms, the Windows Feedback Platform (WFP) supports error handling for application crashes and hangs and provides reporting and customer response management for these errors.
Data Recovery and Application Restart : With Windows Vista, users won't have to restart their computers for most updates and application installations. Windows Vista knows which applications and services are using which files, and if a file needs to be updated, Windows Vista can coordinate saving the application's data, closing the application or stopping the service, updating the file, and automatically reopening the application or restarting the service. This capability is provided by a feature called Restart Manager.
Restart Manager works with Microsoft Update, Windows Update, Microsoft Windows Server Update Services, Microsoft Software Installer, and Microsoft Systems Management Server to detect processes that have files in use and to gracefully stop and restart services without the need to restart the entire machine. Applications that are written to take advantage of the new Restart Manager features can be restarted and restored to the same state and with the same data as before the restart.
I/O Cancellation Support : Windows applications become unresponsive when a function or API is called from a user interface (UI) thread that does not complete within a short period of time and is not cancelable. The UI becomes blocked for a long enough time such that the user of the application decides that it is unlikely to recover. This leads the user to attempt to terminate the application (usually by clicking the X on the window's title bar) or even to reboot the computer. Usability studies conducted by Microsoft show that even periods as short as a few seconds are too long for many users.
Developers sometimes make assumptions about the users' environments that are not correct. Notably, they assume that input or output (I/O) operations to devices will complete quickly. This may not be true for some types of devices, especially for networked devices. Network congestion or latencies can wreak havoc with an application's responsiveness.
Investigations of Windows XP hang reports have resulted in improved I/O cancellation support in Windows Vista, including new Win32 APIs.
One of the most significant improvements is the CancelSynchronousIo API, which enables synchronous file I/O calls to be canceled (OpenFile or GetFileAttributes, for example). Since it must be called from another thread, an application must support multi-threading. (Multi-threading is almost always required for applications to remain responsive.)
Another addition is an enhanced version of an existing API: CancelIoEx. This API requests all pending I/O operations for the specified file handle to be canceled.
These new APIs are supported by corresponding new kernel features. One significant change is that driver-level cancellation for create requests is now supported in Windows Vista.
Obtaining Application Feedback : Windows Vista provides enhanced feedback and diagnostic mechanisms to developers through the mechanisms found in Windows Feedback Platform (which extends the Windows Error Reporting feature found in earlier releases of Microsoft Windows). Specifically, Windows Feedback Platform:
- Makes it easier to detect and obtain information for common scenarios like crashes and hangs.
- Enables the specification and collection of additional data during error handling.
- Adds new diagnostic scenarios for reporting.
Windows Vista provides an extensible reporting environment, online problem tracking, and integration with the development community. With this application, developers can collect the data needed to help debug problems from instances of their applications running in the field. This information is used to generate reports that are archived and studied at a Microsoft developer portal site.
Users can found easier solutions to their problems now
The portal allows Microsoft staff to provide feedback for product improvement to developers, provide end users with information about workarounds or updates, and deliver fixes to resolve issues. This portal is also extended to the Developer Community as a free service at https://winqual.microsoft.com
. This service enables developers to view crash and hang trends by volume and growth over time, download end-user report files such as Mini Dumps, subscribe to events such as Security related issues with their applications, and register responses to connect to their solutions for their customers. With Windows Vista, it is easier for developers to improve their product quality, infer anonymous application state information, and connect with their customers, whether they are IT pros or end users, through the Developer Portal for Windows Feedback Platform services.
In addition, this technology supports system administrators and other IT professionals by allowing them to:
- View the history of errors on a machine to aid in troubleshooting.
- Create policies to control the reporting behavior of desktops in a corporation.
End users benefit not only by improvements to their applications but by having error handling with a consistent look and feel, which appears to be native to Windows Vista. In addition, end users can expect:
- Streamlined data collection and user interface, reducing wait time when forwarding an error report.
- A simple mechanism to cancel reporting.
- A global opt-in mechanism, automating user-response-to-error report requests.
- Improved customer feedback, by allowing users "search for a solution," including automatic solution checking.
All this is supported, while still helping to:
- Make data collection and transport more secure and reliable.
- Protect customer privacy and intellectual property.
- Make management easier, both for users and administrators.
- Support offline scenarios.