Updated: October 2, 2007
File name: PREƒast_annotations.docx
About This Download
Code annotations significantly enhance the ability of PREƒast to detect potential bugs while lowering the rate of false positives. Annotations provide PREƒast with information about the intended use of an annotated function, which allows PREƒast to better determine whether a particular bug exists. Annotations do not interfere with normal compilation of source code.
Annotations improve PREƒast results by:
PREƒast for Drivers version 8.0 supports analysis of code that uses the general-purpose annotations defined in specstrings.h and the driver-specific annotations defined in Driverspecs.h, which are specifically designed for use in kernel-mode drivers. PREƒast for Drivers version 8.0 is available as a standalone tool in the Windows Driver Kit (WDK) for Windows Vista, starting with the February CTP release. The C/C++ Code Analysis tool in Visual Studio Team System, Team Edition for Developers includes the same functionality (without the specialized driver functionality) using the /analyze option.
This paper provides an overview of annotations and how PREƒast interprets them when analyzing code. Developers can use the information in this paper to plan how to apply annotations to their code and get more precise results from PREƒast.
This information applies for the following operating systems:
Important: PREfast driver-specific annotations require WDK build version 6001 or later.
In this white paper: