PREfast, SAL and the Windows SDK

In a prior article I wrote about the benefits of the Standard Annotation Language (SAL) available in various high-end versions of Visual Studio 2005. The good news is the Windows SDK released for Windows Vista Beta 2, also includes PREfast and can therefore take advantage of the SAL-annotated CRT and Windows SDK headers. Viz:

PS C:\Program Files\Microsoft SDKs\Windows\v1.0\VC\Bin> ./cl –help

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86Copyright (C) Microsoft Corporation. All rights reserved.

C/C++ COMPILER OPTIONS

<snip>

-CODE ANALYSIS-

/analyze[:WX-] enable code analysis

WX- - code analysis warnings should not be treated as errors even if /WX is invoked

I’m told that PREfast was also included in the Windows SDK February 2006 CTP release, but I have not verified it.

Finally, as you probably know by now, we wrapped up Windows Vista beta 2 today, so I would wait for the beta 2 SDK to come out anyway!