| |
Microsoft® Windows® XP Developer Guide
Or,
How to make your applications ready for Windows XP
by the Microsoft Windows XP Development Team
This guide is intended for application developers who want to make sure their applications are ready to "play nice" with Windows XP. It is targeted at applications that are being developed, or have been developed, for the WIN32 API. A Windows XP-ready application cooperates with the Windows code-named Windows XP operating system to deliver the best experience for the user.
What is Windows XP?
Windows XP is the version of the Microsoft Windows operating system that follows Windows 2000 and Windows 98 Millennium Edition (ME). Windows XP is based on the Windows 2000 code base and inherits that operating system's reliability and performance. Windows XP also inherits and enhances the new features of the Windows ME operating system, System Restore, Windows Media Player, Windows Image Acquisition, etc. Windows XP will replace both Windows 2000 and Windows 98. For more background, read our FAQ.
What is Windows XP-Ready?
Every version of Microsoft Windows introduces new functionality into the platform. The operating system then uses the new functionality to deliver a better experience to the user. However, users do not just use an operating system when they use their computers, they use applications. In order to deliver the best experience for the user, applications must often support the new functionality as well as the operating system.
For example, one of the features that users want from their computers is to be able to have the computer use little or no power, but still be able to reset to the user's last state quickly. Windows 2000 supports ACPI-based power management that allows a system to lower its power usage all the way to almost zero, but to quickly return to the user's last state. In order to facilitate this, the operating system uses Power Management messages to communicate with applications about the power state transitions, and to find out if the application is in a state that can support the system moving to a lower power use state. If applications do not cooperate with the power state change, then the result could be that the user loses data. If users lose data when their system goes to sleep or hibernates, then the power management functionality of the system is worthless, since users must disable it to ensure data integrity. Applications and the operating system must cooperate for users to have the best user experience, with systems that use as little power as possible, thus saving money on electricity bills and wear and tear on the computers, but that are quickly usable.
Windows XP-ready applications cooperate with the operating system to deliver the best user experience for Windows XP's major new features. Users will see Windows XP-ready applications as the best applications for Windows XP, and thus the applications users should buy to get the most from computers running Windows XP. Specifically, all Windows XP-ready applications will cooperate with these major operating system features:
- Support the new Visual Styles
Test your application with a ComCtl32 v6 manifest and see how your windows and dialogs look with the new visuals. Some custom controls may need to be modified to use the new Theme Manager APIs for rendering and metrics. If things look good, just include the manifest file in your next update.
- Author high-quality icons
Windows XP Beta 2 and later will support 24-bit icons with 8-bit masks up to 128x128 pixels in size. These new icons are displayed in the shell when icon, thumbnail, or the new Tiles view is selected. We encourage developers to author 16x16, 32x32, and 48x48 icons for your applications and devices in this new color depth using the new icon tools and guidelines.
- Support Fast User Switching
Ensure you're using profiles for data separation and test with Terminal Services. Look for new events that indicate when your session has been logged out and behave appropriately when in the background with no UI. Be sure to release contestable resources and have services notify the foreground session.
- Use Shell Folders to find special folders
Windows XP has many new specialized folders to help the user organize and retrieve documents and multimedia files. Folders come with added functionality relating to the type of media stored in the folder. Please use the APIs in ShFolder.dll to locate these folders and distribute it with your products for downlevel compatibility.
- Ensure your app supports Web open/save
The best way to ensure you support the new WebDAV redirector and expose the new My Web Documents folder is to simply use the common file dialogs. However, you still may need to provide better progress indicators and more robust error handling for file transfers, since they could be streaming through a much smaller and less-reliable pipe than traditional file I/O.
- Test your applications on high-density displays
With 133dpi displays on the market and 200dpi displays coming soon, it's important that you test your applications with large fonts and icons. In Windows XP, the maximum DPI setting is now 480dpi, which allows text that is not only more legible, but also of much higher quality than an equivalent 96 DPI monitor. Items that utilize this font feature are, for example, dialog boxes, buttons, title bars, and input by pen and speech.
What other opportunities has Windows XP enabled?
- Use Isolated Components to reduce DLL conflicts
Applications can include manifests that describe their dependencies on system components such as MFC or Comctrl32. Your application can ensure it will consistently get the version of the component that you tested with, to prevent updates from causing problems in the future. Isolation support can also be used for COM components you include in your application and prevent conflicts with other products you ship. The Windows Installer in Windows XP also includes support to install isolated components as well as .NET components that already follow this isolation model.
- Support your application with integrated online services
Our Web Publishing, Image Acquisition, and Internet Photo Printing wizards will allow 3rd-party service providers to be hosted within the wizard frame, providing an easy access point to all types of .NET services. If you can process files online for storage, printing, or any kind of processing, you should consider creating a WebPub service for Windows XP.
- Use Common Login dialog and Credential Manager for authentication
The new common login dialog and Credential Manager (a.k.a. Windows Keyring) should be used in Windows XP to authenticate and store credentials for non-public network servers, including Passport credentials. Your apps can also populate the keyring for the user, eliminating the need for user authentication later.
- Write Autoplay handlers
If your application handles common media types (pictures, music, video), register Autoplay handlers so that common actions your application offers are listed when media with files of that type are inserted in a device.
- Follow Control Panel taxonomy
If you're writing a Control Panel, select the most appropriate category from Windows XP's list of IDs and register it as an extended property.
- Use protocols that work over NAT
Internet Connection Sharing (ICS) and Personal Firewall are enabled and configured automatically by the Home Networking wizard in Windows XP. Make sure your apps use protocols that work in this environment.
- QoS enable your networked applications
QoS (Quality of Service) features in Winsock2 leverage network and operating system functionality to improve the quality of the network service experienced by your application, which is particularly useful for quantitative multimedia applications such as telephony and streaming media, but is also applicable to mission-critical qualitative applications such as database programs, transaction-oriented applications, and mail programs.
- Use IMAPI for CD burning
Support for CD burning can be implemented at a high-level by simply handing files off to the shell, or you can use the Adaptec IMAPI code for more direct control of this process.
- Use Windows XP messaging services for chat
Windows XP will include integrated messaging services based on MSN Messenger and a new SIP audio/video real-time communications (RTC) services.
- Use WIA for image acquisition
Windows XP includes the latest version of Windows Image Acquisition, which includes common dialogs for acquisition of images from digital cameras and scanners.
- Use GDI+ for image rendering
GDI+ provides the industry's most feature-rich, best-performing, and simplest-to-use 2D vector graphics, imaging, and typography solution for Windows and Web developers.
- Use balloons for notification
Alerting the user using a balloon in the notification area is much easier in Windows XP. We encourage developers to use this technique in place of modal dialogs where it's not absolutely necessary to interrupt the user.
|
|
|

|