PREFast is a new tool from Microsoft that is expected to be included in VS 2005. It analyzes unmanaged code for possible buffer overwrites, stack overflows and etc. This tool was used in Microsoft Trustworthy Computing Initiative in 2004. A step by step tutorial is available at Windows Hardware and Driver Central. Interestingly this document says that:
“You can use PREfast to analyze both kernel-mode drivers and other kernel-mode components. You can also use PREfast to analyze user-mode drivers by ignoring any kernel-specific warnings. PREfast is licensed only as a driver development tool. You should not use PREfast to test user-mode applications.”
I presume this applies only for the distribution of PREFast with Windows DDK and in VS 2005 we can expect working version for user mode apps also. Although, the document is good starting point for what you can expect from PREFast.