Click here to learn
about this Sponsor:
Home  |  News  |  Articles  |  Polls  |  Forum  |  Directory

Keywords: Match:
Maximizing driver quality in Windows XP Embedded -- Part 2
by Nick Nehrhood (July 2, 2007)

Foreword: This is part 2 of a two-part series about tools that help developers assess device driver code quality. In Part 1, the author described how to use the Verifier tool; here he explains what to do when Verifer reports a problem.



Maximizing Driver Quality in Windows XP Embedded

Part 2: Using PFD and SDV


by Nick Nehrhood

This is a continuation of the article I wrote here. This part focuses on the utilities that you can add to your toolbox, which will help you ensure quality for drivers for which you do have source code access. Both of these tools are used during compile time of your driver and are available from the Windows Driver Development Kit. Please see the first article to find out how to procure the kit.

PREfast for Drivers (PFD)

The first tool is PREfast for Drivers -- which I'll call PFD in this article. PFD is a compile-time static verification tool that analyzes your C or C++ code and looks for common basic coding errors that the compiler may have missed. This utility does not actually execute any code that it's validating but instead tries to detect come of the compile issues that the compiler itself may ignore and would probably be pretty difficult to debug. In addition -- PFD has an additional module which is designed to detect errors in the kernel-mode driver code.

If you're interested in seeing one example of the tool's output then here's a MSDN sample for PFD called "Uninitialized Variables and NULL Pointers". If you want to read more about PFD, check out this link.

PFD was designed to analyze 32-bit code written for either the x86 or the x86-64 architecture (commonly called 'x64' -- not to be confused with the IA64 architecture). I also recommend that you check out the PREfast Step-by-Step page, here. Finally, I found that Channel 9 has done a video about PREfast for Drivers. One of the developers, Donn Terry, is interviewed on the topic of PFD and even provides some insight as to what benefits and differences (at a high level) exist between PREfast for Drivers and PREfast.

Static Driver Verifier (SDV)

The second tool is Static Driver Verifier -- which I'll call SDV in this article. SDV takes a systematic approach to verifying the driver code, in order to ensure that your driver code, which is written in C, doesn't cause any interoperability issues with the Windows OS kernel. This utility will examine all code paths within the code and even has the ability to find errors in obscure code paths which may or may not be exercised even with through testing.

SDV can validate File System Filter drivers as well as device drivers which are in compliance with the Windows Driver Model (WDM). It can validate function drivers, filter drivers, and bus drivers in the x86 as well as the x86-64 environment.

If you're interested in seeing one example of the tool's usage and output then you can check out this article, titled "Verifying Fail_Driver1." If you want to read more about SDV, you can visit this link.

What to do with these tools

So, you may ask, "Nick, what would you do?" Well, I would run both utilities if my code was written in C, and if my code was written in C++ or managed code (.NET) then I would only use PFD.

Yes -- that's right. You read that correctly. PFD can even verify drivers written in managed code! Also, if you're interested in the normal PREfast (the version used against your applications), then you can get it by purchasing Visual Studio 2005 Team Edition for Software Developers or Visual Studio 2005 Team Suite. For more information on either of those please see this link (search for the words "Static Code Analyzer" to find where PREfast applies).

Ultimately it is up to you, the drivers' developers and testers, to ensure that the drivers that are shipping on/in your company's products are of the utmost quality. After all is said and done, you definitely don't want users to be greeted with a blue screen. *Grin*


Copyright (c) 2007 Microsoft Corp. All rights reserved. Reproduced by WindowsForDevices.com with permission. This article was originally published on the Windows XP Embedded team blog, here.



About the author: Nick Nehrhood's fascination with computers started at age 10 when his uncle showed him an Amiga. He is known as the "hardware guru" of the XP Embedded Team where he has been since 2001. Still a "child at heart," Nick's spare time interests include gaming, software development, and being a "Wikipedia addict."



Related stories:

(Click here for further information)


Windows XP for Embedded Applications
This white paper describes the benefits of using Windows XP when developing embedded applications.

A Manager's Guide to Selecting a Mobile Device Operating System
This white paper offers a comparative review of Microsoft Windows CE and Windows Mobile.

Visual Basic 6.0 to .NET Migration
This paper focuses on the methodology and techniques which Infosys (Microsoft Technology Center) has developed for migrating VB 6.0 Applications to .NET. Our approach ensures a smooth, cost effective, and efficient migration.

Mobile Device Security: Securing the Handheld, Securing the Enterprise
This whitepaper identifies security threats to corporate data on mobile devices and details how mobile devices can become a "backdoor" to the enterprise.

Mobile Device Security: The Eight Areas of Risk
It's common knowledge that adding mobile devices to your network increases security risks. There are multiple facets to mobile security, all of which should be paid close attention to. This E-Guide presents a more in depth look into the eight key areas of securing wireless devices.

Quality Assurance and .NET
This paper discusses best practices for functional, regression and load testing of .NET applications.

SCADA Security in Integrated Networks
As businesses leverage their SCADA systems by integrating them into the business networks, they must also assure the security of the SCADA system.

The Advantages of Small Form Factor HMI
HMIs have mutated and changed with new requirements, and they have become more flexible and capable. And while they've been doing that, they've become smaller and more useful.

9 Critical Requirements for Web Application Security
Learn why your Web applications expose dangerous security breaches and what’s required to effectively protect your Web applications and the sensitive information behind them.

 


Got a HOT tip?   please tell us!
Free weekly newsletter
Enter your email...
Click here for a profile of each sponsor:
PLATINUM SPONSORS
(Become a sponsor)

ADVERTISEMENT
(Advertise here)


Updated! The latest Windows-powered...

mobile phones!

other cool
gadgets

HOT TOPICS
Microsoft targets PNDs with new embedded OS
Microsoft tips .NET MF 3.0 highlights
Microsoft previews Windows Embedded Standard
Microsoft offers free Windows CE 6.0 textbook
Microsoft renames embedded operating systems
Microsoft unveils Windows Mobile 6.1
New Atom models target low-cost PCs
REFERENCE GUIDES
Windows Device Showcase
Intro to Windows Embedded
Intro to Shared Source
Real-time Windows Embedded
Windows Embedded books
Join our Windows Embedded discussion forums:
Windows XP Embedded
Windows CE
Windows Mobile


Windows Embedded developer newsgroups
Windows CE
XP Embedded
PocketPC
Smartphone

Microsoft's Windows Embedded resources
Embedded dev center
Mobile dev center
Windows CE tutorials
XP Embedded tutorials
Windows Embedded seminars
Windows Embedded application categories
3rd-party partners


BREAKING NEWS

• Superscalar ARM SoC runs Windows CE
• CE-based nav stack heads for CES
• Windows phone has dual displays
• Cortex-A8 SoC targets netbooks
• Palm "Nova" Linux set for CES debut?
• Editors' retrospective -- Windows-powered Devices in 2008
• Firefox mobile browser alphas released
• Box PC doubles as car computer
• Windows phone has dual active radios
• Windows PMP has dual-core CPU
• COM Express module sports Atom
• "Half-rack" network appliance runs Windows
• Cross-platform NAS runs Windows
• ARM to dominate MIDs?
• Toshiba launches first 512GB SSD


MOST POPULAR (last 90 days)
• "Netbook" uses Intel's Atom N270
• Windows CE takes on Linux in low-end netbooks
• HTC ups Touch resolution
• Microsoft unleashes new embedded OS
• Windows Mobile phone gets 800 x 480 display
• HTC spins WiMAX phone?
• Smart camera sports Atom
• Dual-core AMD netbook gets rave review
• Windows Mobile 7 "delayed"
• GPS phone uses new Marvell "Tavor" chip
MOST POPULAR (Classics from the vault)
Windows XP Embedded USB boot
Troubleshooting Windows XPe's blue screen "Stop 0x0000007B" error
Asus reveals $190 mini notebook
Windows Mobile 6 SDKs available for download
Windows Mobile VPN client plays with Cisco
HTC adds GPS to Windows Mobile Touch line
Microsoft unveils Windows Mobile 6.1
Guide to HTC's Windows Mobile smartphone platforms
• HTC releases Touch Diamond ROM upgrade
Customizing Windows XP Embedded thin clients

Also visit our sister sites:


Sign up for WindowsForDevices.com's...

news feed

Home  |  News  |  Articles  |  Polls  |  Forum  |  Directory  |  About  |  Contact
 

Ziff Davis Enterprise Home | Contact Us | Advertise | Link to Us | Reprints | Magazine Subscriptions | Newsletters
Tech RSS Feeds | White Papers | ROI Calculators | Tech Podcasts | Tech Video | VARs | Channel News

Baseline | Careers | Channel Insider | CIO Insight | DesktopLinux | DeviceForge | DevSource | eSeminars |
eWEEK | Enterprise Network Security | LinuxDevices | Linux Watch | Microsoft Watch | Mid-market | Networking | PDF Zone |
Publish | Security IT Hub | Strategic Partner | Web Buyer's Guide | Windows for Devices

Developer Shed | Dev Shed | ASP Free | Dev Articles | Dev Hardware | SEO Chat | Tutorialized | Scripts |
Code Walkers | Web Hosters | Dev Mechanic | Dev Archives | igrep

Use of this site is governed by our Terms of Service and Privacy Policy. Except where otherwise specified, the contents of this site are copyright © 1999-2008 Ziff Davis Enterprise Holdings Inc. All Rights Reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis Enterprise is prohibited. Windows is a trademark or registered trademark of Microsoft Corporation in the United States and/or other countries and is used by WindowsForDevices under license from owner. All other marks are the property of their respective owners. WindowsForDevices is an independent publication not affiliated with Microsoft Corporation.